DEV Community

Discussion on: A Clean Approach to Using Express Validator

Collapse
 
damien1990 profile image
Damien1990

Thank you, it worked beautifully. I'm guessing you can use a similar approach to checking for 'unique' emails/usernames by requiring the model in the validator class, using the value to search for existing emails/usernames in the database and if one is returned, to throw an error?

Thread Thread
 
nedsoft profile image
Chinedu Orie

yes