-
-
Save Piterden/175a8f9b1e55e3e8a4800f06a7f5dc25 to your computer and use it in GitHub Desktop.
Revisions
-
ganqqwerty revised this gist
Jun 18, 2019 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,4 +8,6 @@ ngOnInit() { this.myForm = this.fb.group({ myCheckbox: [''], myEmailField: ['', this.emailValidators] }) //... } -
ganqqwerty created this gist
Jun 18, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ private emailValidators = [ Validators.maxLength(250), Validators.minLength(5), Validators.pattern(/.+@.+\..+/) ]; ngOnInit() { this.myForm = this.fb.group({ myCheckbox: [''], myEmailField: ['', this.emailValidators] })