SIGN IN SIGN UP
angular / angular.js UNCLAIMED

AngularJS - HTML enhanced for web apps!

0 0 0 JavaScript

fix(ngRequired): set error correctly when inside ngRepeat and false by default

Previously, in the required validator, we would read the required setting directly
from attr.required, where it is set by ngRequired.

However, when the control is inside ngRepeat, ngRequired sets it only after a another digest has
passed, which means the initial validation run of ngModel does not include the correct required
setting. (Before commit 0637a2124c4515311a317e0e39926521228fc0af this would not have been a problem,
as every observed value change triggered a validation).

We now use the initially parsed value from ngRequired in the validator.

Fixes #16814
Closes #16820
M
Martin Staffa committed
5ad4f5562c37b1cb575e3e5fddd96e9dd10408e2
Parent: 43bb414
Committed by Martin Staffa <mjstaffa@gmail.com> on 1/26/2019, 10:31:56 AM