You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
What else do you have in mind? Validating single fields is pretty well supported. Validating / comparing multiple fields is not straight-forward, that is true.
@Narretz, it is indeed a pain-point to have a field match the value of another field (e.g. password and password confirmation).
The main issue (imo) is that it is not possible (in a reasonably straight-forward way) to trigger validation on a field if the field's value has not changed (even if a field affecting one of its validators has changed).
Maybe, it would be useful to have a (public) way of "forcing" the parse/validate pipeline (even if the $viewValue hasn't changed).
Would hope one could add $validator methods on a FormController, similar to NgModelController except that possibly no value would be passed, data would be brought in through services or a non-isolated scope.
To have a way of separating this logic from the controller, which could get bloated; run these checks when form changes and not on form submission or via explicit $scope.$watch; and hook into $error to be able to show error messages.
Form level check are used to validate that information is congruent throughout the form.
If a child has a birthdate that is earlier than the parent. (Dynamic List of people with relationships)
If someone tries to make multiple withdrawals worth more than a maximum or more than what they stated they would withdraw. (Dynamic List of withdrawal slips / sum?)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Angular 1.x
Simplest case would be checking that passwords match.
This form validation fiddle (http://jsfiddle.net/cafau/Ja2ar/) does the job using $scope.$watch.
Could some option become available to allow the addition of validations through directives using a required form controller.
The text was updated successfully, but these errors were encountered: