MCPcopy
hub / github.com/angular/angular / CustomValidator

Class CustomValidator

packages/forms/test/reactive_integration_spec.ts:73–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71// Produces a new @Directive (with a given selector) that represents a validator class.
72function createValidatorClass(selector: string) {
73 @Directive({
74 selector,
75 providers: [
76 {
77 provide: NG_VALIDATORS,
78 useClass: forwardRef(() => CustomValidator),
79 multi: true,
80 },
81 ],
82 standalone: false,
83 })
84 class CustomValidator implements Validator {
85 validate(control: AbstractControl) {
86 return null;
87 }
88 }
89 return CustomValidator;
90}
91

Callers

nothing calls this directly

Calls 2

DirectiveInterface · 0.90
forwardRefFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…