MCPcopy Create free account
hub / github.com/angular/components / validate

Method validate

src/material/slide-toggle/slide-toggle.ts:277–281  ·  view source on GitHub ↗

Implemented as a part of Validator.

(control: AbstractControl<boolean>)

Source from the content-addressed store, hash-verified

275
276 /** Implemented as a part of Validator. */
277 validate(control: AbstractControl<boolean>): ValidationErrors | null {
278 return this.required && control.value !== true && !this._signalFormField
279 ? {'required': true}
280 : null;
281 }
282
283 /** Implemented as a part of Validator. */
284 registerOnValidatorChange(fn: () => void): void {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected