Im new to Mongoose...I have a code snippet below. If I want to check what comes after the @ symbol in an email before I save, how would I do that validation?
var user = new User ({
firstName: String,
lastName: String,
email: String,
regDate: [Date]
});
user.save(function (err) {
if (err) return handleError(err);
})