MCPcopy Index your code
hub / github.com/angular/angular / hasError

Function hasError

packages/forms/src/model/abstract_model.ts:1646–1648  ·  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

1644 * If the control is not present, false is returned.
1645 */
1646 hasError(errorCode: string, path?: Array<string | number> | string): boolean {
1647 return !!this.getError(errorCode, path);
1648 }
1649
1650 /**
1651 * Retrieves the top-level ancestor of this control.

Callers

nothing calls this directly

Calls 1

getErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…