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

Method required

packages/forms/src/validators.ts:233–235  ·  view source on GitHub ↗

* @description * Validator that requires the control have a non-empty value. * * @usageNotes * * ### Validate that the field is non-empty * * ```ts * const control = new FormControl('', Validators.required); * * console.log(control.errors); // {required: true} * ```

(control: AbstractControl)

Source from the content-addressed store, hash-verified

231 *
232 */
233 static required(control: AbstractControl): ValidationErrors | null {
234 return requiredValidator(control);
235 }
236
237 /**
238 * @description

Callers 15

InputSignatureTestClass · 0.45
InputCompClass · 0.45
DirClass · 0.45
AppComponentClass · 0.45
DirClass · 0.45
ChildComponentClass · 0.45
ContainerClass · 0.45

Calls 1

requiredValidatorFunction · 0.85

Tested by

no test coverage detected