| 71 | // Produces a new @Directive (with a given selector) that represents a validator class. |
| 72 | function 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 |
nothing calls this directly
no test coverage detected
searching dependent graphs…