AngularJs Custom Directive fails the text box validation
问题 I have written a custom directive to ensure that a text box can take only integer values. But After using the directive, my $error.required flag always stay false irrespective of whether I have a value in the text field or not. It works fine if I use the native input type, <input name="name" ng-model="testvalue.number" required /> but when I use the custom directive, <number-only-input input-value="testvalue.number" input-name="name"/> shippingForm.name.$error.required is always false and it