以必要欄位為例
html
====
<form novalidate name="form1">
<select required name="帳戶編號" class='form-control' ng-model='selectData["帳戶編號"]' ng-options='a.value as a.text for a in accounts'><option value='' disabled>請選擇</option></select><span style='color:red' ng-show="form1['帳戶編號'].$error.required">*</span>
</form>
javascript
====
if ($scope.form1.$error.required) {
toaster.error("必要欄位輸入不完整!!");
return;
}
沒有留言:
張貼留言