Skip to content

Instantly share code, notes, and snippets.

@alexonozor
Last active September 2, 2017 06:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexonozor/05311886e1a32e326046bf26c516863a to your computer and use it in GitHub Desktop.
Save alexonozor/05311886e1a32e326046bf26c516863a to your computer and use it in GitHub Desktop.
const userForm = new FormGroup({
userName: new FormControl('', [ Validators.required, Validators.minLength(4)]),
firstName: new FormControl('', [ Validators.required, Validators.minLength(2)]),
lastName: new FormControl(''),
address: new FormGroup({
street: new FormControl('', Validators.required),
city: new FormControl(''),
zipCode: new FormControl('')
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment