class Validators { static required(control: AbstractControl) : ValidationErrors| }
Provides a set of validators used by form controls.
A validator is a function that processes a FormControl
or collection of controls and returns a map of errors. A null map means that validation has passed.
var loginControl = new FormControl("", Validators.required)
required(control: AbstractControl) : ValidationErrors|
Validator that requires controls to have a non-empty value.
exported from forms/index, defined in forms/src/validators.ts
© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/docs/ts/latest/api/forms/index/Validators-class.html