Ghost/ghost/admin/validators/forgotten.js

17 lines
393 B
JavaScript
Raw Normal View History

var ForgotValidator = Ember.Object.create({
check: function (model) {
var data = model.getProperties('email'),
validationErrors = [];
if (!validator.isEmail(data.email)) {
validationErrors.push({
message: 'Invalid email address'
});
}
return validationErrors;
}
});
export default ForgotValidator;