【发布时间】:2015-10-10 08:59:57
【问题描述】:
<section class="col col-6">
<label class="input">
<i class="icon-append fa fa-building"></i>
<input type="text" ng-model="customer.Name" name="customerName" placeholder="Customer Name" required>
<span style="color:red" ng-show="myForm.customerName.$dirty && myForm.customerName.$invalid">
<span ng-show="myForm.customerName.$error.required">Name Required</span>
</span>
</label>
</section>
我怎样才能在上面实现custom validation?我应用 angularjs 验证它工作正常,但我想在这个标签上自定义估值。我希望用户在此文本框中仅插入字母。
【问题讨论】: