Ghost/ghost/admin/app/validators/setup.js

15 lines
424 B
JavaScript
Raw Normal View History

import NewUserValidator from 'ghost/validators/new-user';
export default NewUserValidator.create({
properties: ['name', 'email', 'password', 'blogTitle'],
blogTitle: function (model) {
var blogTitle = model.get('blogTitle');
if (!validator.isLength(blogTitle, 1)) {
model.get('errors').add('blogTitle', 'Please enter a blog title.');
this.invalidate();
}
}
});