Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Duplicate Email should be rejected by Default #281
nice, originally I was using the default suggested database in the 'quick start' app - (NEDB) which didn't support validation schemas.
I wrote my own validateHook (way worse than yours though, it just searched for all users by the email and returned a promise..) when I threw an error it wasn't registering that an error was thrown (I realized later this was because it was inside a promise - the service.find promise)
I ended up then switching to MongoDB which uses mongoose for Schemas - this worked nicely and rejected duplicate emails. However the error it returned wasn't sufficient for users. Have any idea how I can work around that without having to do string compares and write my own error that way?