Answers for "check if email is valid mongoose schema"

1

email validation in mongoose

import { isEmail } from 'validator';
// ... 

const EmailSchema = new Schema({
    email: { 
        //... other setup
        validate: [ isEmail, 'invalid email' ]
    }
});
Posted by: Guest on August-25-2020

Code answers related to "check if email is valid mongoose schema"

Browse Popular Code Answers by Language