Answers for "validation npm email in mongoose example"

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 "validation npm email in mongoose example"

Browse Popular Code Answers by Language