mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
18 lines
337 B
JavaScript
18 lines
337 B
JavaScript
import {isBlank} from 'ember-utils';
|
|
|
|
function init() {
|
|
// Provide a few custom validators
|
|
//
|
|
validator.extend('empty', function (str) {
|
|
return isBlank(str);
|
|
});
|
|
|
|
validator.extend('notContains', function (str, badString) {
|
|
return str.indexOf(badString) === -1;
|
|
});
|
|
}
|
|
|
|
export default {
|
|
init
|
|
};
|