그래서보기에 고장 나는이 내 모델에서 다음과 같은 규칙 : 정규식은 HTML에서 pattern
속성 태그에 적용되는 몇 가지 이유Laravel 유효성 검사 정규식,
public static $rules = array(
'name' => 'required|alpha_dash|unique:subsidiaries',
'internal_number' => 'required|alpha_dash|unique:subsidiaries',
'expedition_rate' => array('required', 'regex:/^[0-9]{1,3}(\.?)[0-9]{1,2}$/'),
'hundred_kg_rate' => array('regex:/^[0-9]{1,5}(\.?)[0-9]{1,2}$/'),
'handling' => array('regex:/^[0-9]{1,3}(\.?)[0-9]{1,2}$/'),
'insurance' => 'required|numeric',
);
하지만, ...이 휴식!
결과 :
<input required="true" pattern="^[0-9]{" class="form-control" ....>
_________
\
=> This right here should be
^[0-9]{1,3}(\.?)[0-9]{1,2}$
어디서 출력하고 있습니까? 혹시'전 (前)'을 사용하고 있습니까? – rmobis
@Raphael_ 실제로'Former'를 사용하고 있습니다 ... 규칙이 컨트롤러에서보기로 전달됩니다 – Alex
그러면 전적으로 Laravel이 아니라 이전의 문제입니다. – rmobis