Skip to content

Instantly share code, notes, and snippets.

@NetanelBasal
Created October 24, 2016 22:05
Show Gist options
  • Save NetanelBasal/57e037331f2d3f666656fcb9185e5d46 to your computer and use it in GitHub Desktop.
Save NetanelBasal/57e037331f2d3f666656fcb9185e5d46 to your computer and use it in GitHub Desktop.
validateUniqueEmailObservable( email : string ) {
return new Observable(observer => {
if( email === "alreadyExistsEmail@gmail.com" ) {
observer.next({asyncInvalid: true});
} else {
observer.next(null);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment