
FormControls, FormGroups, and FormArrays now optionally accept an options object as their second argument. Validators and async validators can be passed in as part of this options object (though they can still be passed in as the second and third arg as before). ```ts const c = new FormControl(, { validators: [Validators.required], asyncValidators: [myAsyncValidator] }); ``` This commit also adds support for passing arrays of validators and async validators to FormGroups and FormArrays, which formerly only accepted individual functions. ```ts const g = new FormGroup({ one: new FormControl() }, [myPasswordValidator, myOtherValidator]); ``` This change paves the way for adding more options to AbstractControls, such as more fine-grained control of validation timing.
Safari (7+), iOS (7+), Edge (14) and IE mobile (11) are tested on BrowserStack.
Angular
Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript and other languages.
Quickstart
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.
Description
Languages
TypeScript
86.3%
JavaScript
8.5%
HTML
1.8%
Starlark
1.7%
CSS
1%
Other
0.6%