【发布时间】:2015-05-25 04:07:53
【问题描述】:
您好,我有表格,我使用了许多字段。提交后,如果一切正常,我正在清除或将表单设置为默认状态,但我仍然收到错误消息。
<div>
<span>Type:</span>
<select class="chosen" name="type" required="" chosen="exp.transactionType" ng-model="exp.selectedTransactionType"
ng-options="tt.value for tt in exp.transactionType">
</select>
<div class="error-msg" ng-show="form.$submitted || form.type.$touched">
<span class="error-msg" ng-show="form.type.$error.required">Select transaction type.</span>
</div>
</div>
我在这里做错了吗?
【问题讨论】:
标签: angularjs angular-ngmodel angularjs-validation