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

Method getError

packages/forms/signals/src/api/types.ts:548–548  ·  view source on GitHub ↗

* Gets the first validation error of the given kind on this field. * * This method is reactive and will re-evaluate when the field's errors change if called * within a reactive context (e.g. `computed` or `effect`). * * @param kind The kind of error (e.g. 'required', 'min'). * @ret

(
    kind: K,
  )

Source from the content-addressed store, hash-verified

546 * @returns The first matching error, or `undefined` if none.
547 */
548 getError<K extends NgValidationError['kind']>(
549 kind: K,
550 ): (Extract<NgValidationError, {kind: K}> & ValidationError.WithFieldTree) | undefined;
551 getError(kind: string): ValidationError.WithFieldTree | undefined;

Callers 5

form_group_spec.tsFile · 0.65
directives_spec.tsFile · 0.65
getErrorFunction · 0.65
hasErrorFunction · 0.65
field_node.spec.tsFile · 0.65

Implementers 1

FieldNodepackages/forms/signals/src/field/node.

Calls

no outgoing calls

Tested by

no test coverage detected