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

Class MustBeCheckedValidator

packages/forms/signals/test/web/reactive_fvc.spec.ts:1410–1420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

DirectiveInterface · 0.90
forwardRefFunction · 0.90

Tested by

no test coverage detected