fix(forms): disabled controls should never be invalid (#11257)

Closes #11253
This commit is contained in:
Kara
2016-09-01 16:51:42 -07:00
committed by Martin Probst
parent 2581c0851a
commit 043493cb62
2 changed files with 8 additions and 1 deletions

View File

@ -360,10 +360,10 @@ export abstract class AbstractControl {
private _calculateStatus(): string {
if (this._allControlsDisabled()) return DISABLED;
if (isPresent(this._errors)) return INVALID;
if (this._anyControlsHaveStatus(PENDING)) return PENDING;
if (this._anyControlsHaveStatus(INVALID)) return INVALID;
if (this._allControlsDisabled()) return DISABLED;
return VALID;
}