Last active
June 19, 2019 21:14
-
-
Save ganqqwerty/34431cce47ffb6dd2a1aebb41cb2f746 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
// For example, you can pass multiple validators composed with Validator.compose | |
// if the myTextField has the word 'Illuminati' | |
conditionalValidator(() => this.myForm.get('myTextField').value.includes('Illuminati'), | |
Validators.compose([ | |
Validators.required, | |
Validators.pattern(/.*mason.*/) | |
]) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment