FormUtils
class
class FormUtils { static getErrorState(control: AbstractControl): boolean; static mergeInnerErrors(host: AbstractControl, inner: AbstractControl): void;}Methods
Section titled “Methods”getErrorState
Section titled “getErrorState”getErrorState(control: AbstractControl): booleanArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| control | AbstractControl |
mergeInnerErrors
Section titled “mergeInnerErrors”Writes the errors of a form element’s inner control onto the hosting control without dropping the host’s own validation result (e.g. required set up by the surrounding form). host.setErrors(inner.errors) alone would wipe those whenever the inner control is valid.
mergeInnerErrors(host: AbstractControl, inner: AbstractControl): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| host | AbstractControl | |
| inner | AbstractControl |