MCPcopy Create free account
hub / github.com/angular/angular / hasError

Function hasError

packages/forms/src/model/abstract_model.ts:1669–1671  ·  view source on GitHub ↗

* @description * Reports whether the control with the given path has the error specified. * * @param errorCode The code of the error to check * @param path A list of control names that designates how to move from the current control * to the control that should be queried for errors.

(errorCode: string, path?: Array<string | number> | string)

Source from the content-addressed store, hash-verified

1667 * If the control is not present, false is returned.
1668 */
1669 hasError(errorCode: string, path?: Array<string | number> | string): boolean {
1670 return !!this.getError(errorCode, path);
1671 }
1672
1673 /**
1674 * Retrieves the top-level ancestor of this control.

Callers

nothing calls this directly

Calls 1

getErrorMethod · 0.65

Tested by

no test coverage detected