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

Method getError

packages/forms/signals/src/field/node.ts:265–267  ·  view source on GitHub ↗
(kind: string)

Source from the content-addressed store, hash-verified

263 ): (Extract<NgValidationError, {kind: K}> & ValidationError.WithFieldTree) | undefined;
264 getError(kind: string): ValidationError.WithFieldTree | undefined;
265 getError(kind: string): ValidationError.WithFieldTree | undefined {
266 return this.errors().find((e) => e.kind === kind);
267 }
268
269 hasMetadata(key: MetadataKey<any, any, any>): boolean {
270 return this.metadataState.has(key);

Callers

nothing calls this directly

Calls 2

errorsMethod · 0.95
findMethod · 0.45

Tested by

no test coverage detected