| 1408 | } |
| 1409 | |
| 1410 | @Directive({ |
| 1411 | selector: '[mustBeChecked]', |
| 1412 | providers: [ |
| 1413 | {provide: NG_VALIDATORS, useExisting: forwardRef(() => MustBeCheckedValidator), multi: true}, |
| 1414 | ], |
| 1415 | }) |
| 1416 | class MustBeCheckedValidator implements Validator { |
| 1417 | validate(control: AbstractControl): ValidationErrors | null { |
| 1418 | return control.value === true ? null : {mustBeChecked: true}; |
| 1419 | } |
| 1420 | } |
| 1421 | |
| 1422 | describe('FormControlDirective with FVC and validator directives', () => { |
| 1423 | it('should apply validator directives on the element to the FormControl', () => { |
nothing calls this directly
no test coverage detected