MCPcopy Index your code
hub / github.com/angular/angular / requiredTrue

Method requiredTrue

packages/forms/src/validators.ts:258–260  ·  view source on GitHub ↗

* @description * Validator that requires the control's value be true. This validator is commonly * used for required checkboxes. * * @usageNotes * * ### Validate that the field value is true * * ```ts * const control = new FormControl('some value', Validators.requiredTrue)

(control: AbstractControl)

Source from the content-addressed store, hash-verified

256 *
257 */
258 static requiredTrue(control: AbstractControl): ValidationErrors | null {
259 return requiredTrueValidator(control);
260 }
261
262 /**
263 * @description

Callers 1

validators_spec.tsFile · 0.80

Calls 1

requiredTrueValidatorFunction · 0.85

Tested by

no test coverage detected