| 662 | } |
| 663 | |
| 664 | @Directive({ |
| 665 | selector: '[mustBeChecked]', |
| 666 | providers: [ |
| 667 | {provide: NG_VALIDATORS, useExisting: forwardRef(() => MustBeCheckedValidator), multi: true}, |
| 668 | ], |
| 669 | }) |
| 670 | class MustBeCheckedValidator implements Validator { |
| 671 | validate(control: AbstractControl): ValidationErrors | null { |
| 672 | return control.value === true ? null : {mustBeChecked: true}; |
| 673 | } |
| 674 | } |
| 675 | |
| 676 | describe('NgModel with FVC and validator directives', () => { |
| 677 | it('should apply validator directives on the element to the control', async () => { |
nothing calls this directly
no test coverage detected