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 has been archived by the owner on Sep 4, 2019. It is now read-only.
Testing in Angular 1.2.21, if an input is prepopulated via ng-model, a required validation error will always be thrown if ng-disabled ever evaluates to true. If ng-disabled is always false, then validation still works correctly.
The only solution was to combine ng-disabled with val-if, having one evaluate opposite of the other.
It looks as if ng-disabled is doing something under the hood that isn't playing nicely with the unobtrusive validation unless you purposefully reset the validation using val_if.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Testing in Angular 1.2.21, if an input is prepopulated via
ng-model
, a required validation error will always be thrown ifng-disabled
ever evaluates to true. Ifng-disabled
is always false, then validation still works correctly.The only solution was to combine
ng-disabled
withval-if
, having one evaluate opposite of the other.Example:
It looks as if
ng-disabled
is doing something under the hood that isn't playing nicely with the unobtrusive validation unless you purposefully reset the validation usingval_if
.The text was updated successfully, but these errors were encountered: