我会得到错误,比如字段变红,显示字符数变红。但是没有显示错误信息。在控制台中没有发现错误。我还添加了 angular-1.3.4 ngMessages 依赖项。请帮忙。
<div class="col-md-3 col-sm-6 col-xs-12">
<md-input-container flex>
<label>{{field.field_title}}</label>
<input ng-model="field.field_value" name="username" type="text" placeholder="Placeholder text"
ng-required="field.field_required" md-maxlength="field.max" >
<div ng-messages="userForm.username.$error">
<p ng-message="maxlength">Your name is too long.</p>
<p ng-message="required">Your name is required.</p>
</div>
</md-input-container>
</div>