这里我写了一个简单的范围验证器,它处理所需的验证器,但是如何编写范围验证器
<input type="text" class="form-control" name="nam" ng-model="User.EmpName" ng-minlength="2" ng-maxlength="4" ng-class="Submitted?'ng-dirty':''" required autofocus />
<span class="Error" ng-show="(f1.nam.$dirty||Submitted)&&f1.nam.$error.required">Please Enter Your Name</span>
<span class="Error" ng-show="(f1.nam.$dirty||Submitted)&&f1.nam.$error.number">Please min2 AND MAX 4 Your Name</span>