MCPcopy
hub / github.com/angular/angular / Validator

Interface Validator

packages/forms/src/directives/validators.ts:91–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89 * @publicApi
90 */
91export interface Validator {
92 /**
93 * @description
94 * Method that performs synchronous validation against the provided control.
95 *
96 * @param control The control to validate against.
97 *
98 * @returns A map of validation errors if validation fails,
99 * otherwise null.
100 */
101 validate(control: AbstractControl): ValidationErrors | null;
102
103 /**
104 * @description
105 * Registers a callback function to call when the validator inputs change.
106 *
107 * @param fn The callback function
108 */
109 registerOnValidatorChange?(fn: () => void): void;
110}
111
112/**
113 * A base class for Validator-based Directives. The class contains common logic shared across such

Callers 9

_reportMethod · 0.65
normalizeValidatorsFunction · 0.65
validateStandardSchemaFunction · 0.65
validateMethod · 0.65
cvaControlCreateFunction · 0.65

Implementers 10

CustomValidatorpackages/forms/test/reactive_integrati
NoOpValidatorpackages/forms/test/reactive_integrati
CustomValidatorDirectivepackages/forms/test/directives_spec.ts
NoOpValidatorpackages/forms/test/template_integrati
LegacyControlWithValidatorspackages/forms/signals/test/web/intero
LegacyControlWithOnValidatorChangepackages/forms/signals/test/web/intero
UnambiguousRoleValidatorDirectiveadev/src/content/examples/form-validat
ForbiddenValidatorDirectiveadev/src/content/examples/form-validat
UnambiguousRoleValidatorDirectiveadev/src/content/examples/form-validat
NoOpAsyncValidatorpackages/forms/test/reactive_integrati

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…