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

Function requiredValidator

packages/forms/src/validators.ts:502–504  ·  view source on GitHub ↗
(control: AbstractControl)

Source from the content-addressed store, hash-verified

500 * See `Validators.required` for additional information.
501 */
502export function requiredValidator(control: AbstractControl): ValidationErrors | null {
503 return isEmptyInputValue(control.value) ? {'required': true} : null;
504}
505
506/**
507 * Validator that requires the control's value be true. This validator is commonly

Callers 1

requiredMethod · 0.85

Calls 1

isEmptyInputValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…