Commit 9a73f528 authored by Vytor Calixto's avatar Vytor Calixto 👾
Browse files

Adicionada verificação para e-mails da UFPR

parent 9be57be7
......@@ -68,4 +68,8 @@ Usuario.methods.checkPassword = function(password) {
return this.encryptPassword(password) === this.hashedPassword
}
Usuario.path('email').validate(function (value) {
return /[\s\S]*@?ufpr.br/.test(value)
}, 'E-mail validation failed')
module.exports = mongoose.model('Usuario', Usuario)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment