我的Chrome版本高于40,但"minlength“属性仍然不起作用。
<label for="mobile">Mobile</label>
<input type="text" class="form-control" id="mobile" name="mobile" value="{{$employee->profile->mobile}}" placeholder="Mobile" data-validation="number" data-validation-error-msg="The phone number must be 10 characters" maxlength="10" minlength="10">发布于 2016-08-27 11:42:56
当用户在输入中输入值时,Minlength起作用。如果它是在源代码中硬编码的,或者是使用JavaScript (例如)以编程方式设置的,则不会强制执行minlength。
{{$employee->profile->mobile}}是从哪里来的?在设置数据之前,应修改数据以满足约束条件。
https://stackoverflow.com/questions/39159898
复制相似问题