Ghost/core/client/utils/validator-extensions.js
Robert Jackson a3456b7e1c Remove lodash from admin client.
* Adds `bind`, `isFinite`, and `isNumber` utility functions from lodash.
* Use new util funtions instead of lodash throughout the codebase.
* Remove lodash from vendor builds.
2014-10-23 18:27:09 +00:00

16 lines
311 B
JavaScript

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
};