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

Interface Validator

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

Source from the content-addressed store, hash-verified

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

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
TemplateSelfValidatingFvcInputpackages/forms/signals/test/web/templa
MustBeCheckedValidatorpackages/forms/signals/test/web/templa
SelfValidatingFvcInputpackages/forms/signals/test/web/reacti
InitValidatingFvcInputpackages/forms/signals/test/web/reacti
MustBeCheckedValidatorpackages/forms/signals/test/web/reacti
UnambiguousRoleValidatorDirectiveadev/src/content/examples/form-validat

Calls

no outgoing calls

Tested by

no test coverage detected