Created
February 8, 2018 20:13
-
-
Save djabif/439559baaad9cd78630103f9c10f3236 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { UsernameValidator } from '../../validators/username.validator'; | |
this.validations_form = this.formBuilder.group({ | |
username: new FormControl('', Validators.compose([ | |
UsernameValidator.validUsername, | |
Validators.maxLength(25), | |
Validators.minLength(5), | |
Validators.pattern('^(?=.*[a-zA-Z])(?=.*[0-9])[a-zA-Z0-9]+$'), | |
Validators.required | |
])), | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment