Created
October 24, 2016 22:01
-
-
Save NetanelBasal/371fd4a10fea2e3316cb6ab15729a923 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
validateUniqueEmailPromise( email : string ) { | |
return new Promise(resolve => { | |
setTimeout(() => { | |
if( email === "alreadyExistsEmail@gmail.com" ) { | |
resolve({ | |
asyncInvalid: true | |
}) | |
} else { | |
resolve(null); | |
} | |
}, 2000); | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment