Last active
June 19, 2019 21:18
-
-
Save ganqqwerty/002852482f9c19c24e6aadd3a73a02ef to your computer and use it in GitHub Desktop.
This file contains 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
this.myForm = this.fb.group({ | |
myCheckbox: [''], | |
myEmailField: ['', [ | |
Validators.maxLength(250), | |
Validators.minLength(5), | |
Validators.pattern(/.+@.+\..+/) | |
]] | |
}, { | |
validators: [emailConditionallyRequiredValidator] // <----- | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment