Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fix(ngRequired): set error correctly when inside ngRepeat and false b… #16820

Merged
merged 1 commit into from Jan 26, 2019

Commits on Jan 25, 2019

  1. fix(ngRequired): set error correctly when inside ngRepeat and false b…

    …y 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 0637a21 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 angular#16814
    Narretz committed Jan 25, 2019
    Copy the full SHA
    42a9eca View commit details
    Browse the repository at this point in the history