Validators

export class Validators

exported from angular2/common defined in angular2/src/common/forms/validators.ts (line 28)

Provides a set of validators used by form controls.

A validator is a function that processes a Control or collection of controls and returns a map of errors. A null map means that validation has passed.

Example

var loginControl = new Control("", Validators.required)