0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/core/client/app/utils/validator-extensions.js

17 lines
338 B
JavaScript
Raw Normal View History

2015-02-12 23:22:32 -05:00
import Ember from 'ember';
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
};