Trigger validation of a field when another field is changed

After searching a lot for this I’ve found that we can trigger validation simply by calling $validate() on the desired field.
So for example if your form is named my_form (i.e. in the markup the form tag has a name="my_form" attribute) and the name of the field you want to validate is date (in the markup the input field has a name="date" attribute), then as you suggested you can use the ng-change event of the second field and call $scope.my_form.date.$validate(); whenever the ng-change function is invoked.

Leave a Comment