Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'use strict';
- var mongoose = require('mongoose');
- var Schema = mongoose.Schema;
- // define the schema for our user model
- var User = new Schema({
- email: String,
- password: String
- });
- User.methods.isEmailQualified = function(email) {
- var re = /\S+@\S+\.\S+/;
- return re.test(email);
- };
- module.exports = mongoose.model('User', User);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement