igi_orion_cignacmb
Version:
Censors words out of text
19 lines (13 loc) • 528 B
JavaScript
var CentralValidator = require('./CentralValidator');
var input = $.extend({}, CentralValidator, {
validate: function (strToValidate) { //用于验证,如有错误,返回数组,便于前端提示
var that = this;
var errors = [];
if(false){
errors.push({type: "modal", msg: '不能为空', code: ''})
}
// avalon.log(that.value + ':执行了validate操作')
return errors.length > 0 ? errors : null;
},
});
module.exports = input;