Answers for "mongoose schema email validation"

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 "mongoose schema email validation"

Browse Popular Code Answers by Language