mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
17 lines
338 B
JavaScript
17 lines
338 B
JavaScript
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
|
|
};
|