Created
September 23, 2019 14:58
-
-
Save nicobytes/fee633fbe0285f4f0873ba37c0f563ce 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
export class ValidateEmailNotTaken { | |
static createValidator(signupService: SignupService) { | |
return (control: AbstractControl) => { | |
return signupService.checkEmailNotTaken(control.value).map(res => { | |
return res ? null : { emailTaken: true }; | |
}); | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment