angular-cn/public/docs/js/latest/api/forms/Validators-class.jade

96 lines
1.1 KiB
Plaintext
Raw Normal View History

2015-04-19 13:53:18 -07:00
p.
<span class="location-badge">exported from <a href="/angular2/forms">angular2/forms</a></span>
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/forms/validators.js#L16">angular2/src/forms/validators.js (line 16)</a>
:markdown
Provides a set of validators used by form controls.
# Example
```
var loginControl = new Control("", Validators.required)
```
.l-main-section
h2 Members
.l-sub-section
h3 array
pre.prettyprint
code.
2015-04-20 13:57:43 -07:00
array(c:modelModule.ControlArray)
2015-04-19 13:53:18 -07:00
:markdown
.l-sub-section
h3 compose
pre.prettyprint
code.
2015-04-20 13:57:43 -07:00
compose(validators:List&lt;Function&gt;)
2015-04-19 13:53:18 -07:00
:markdown
.l-sub-section
h3 group
pre.prettyprint
code.
2015-04-20 13:57:43 -07:00
group(c:modelModule.ControlGroup)
2015-04-19 13:53:18 -07:00
:markdown
.l-sub-section
h3 nullValidator
pre.prettyprint
code.
2015-04-20 13:57:43 -07:00
nullValidator(c:any)
2015-04-19 13:53:18 -07:00
:markdown
.l-sub-section
h3 required
pre.prettyprint
code.
2015-04-20 13:57:43 -07:00
required(c:modelModule.Control)
2015-04-19 13:53:18 -07:00
:markdown