Ghost/core/client/utils/validator-extensions.js

16 lines
311 B
JavaScript
Raw Normal View History

function init() {
// Provide a few custom validators
//
validator.extend('empty', function (str) {
return Ember.isBlank(str);
});
validator.extend('notContains', function (str, badString) {
return str.indexOf(badString) === -1;
});
}
export default {
init: init
};