There is a simple sample with column validation:
function requiredFieldValidator(value) {
if (value == null || value == undefined || !value.length)
By default, you cannot pass more parameters into the validator method, however you can easily edit the source to allow it.
in slick.editors.js look for:
this.validate = function () {
if (args.column.validator) {
var validationResults = args.column.validator($input.val());
if (!validationResults.valid) {
return validationResults;
}
}
return {
valid: true,
msg: null
};
};
change: var validationResults = args.column.validator($input.val());
to: var validationResults = args.column.validator($input.val(), $input);
this will change your validator method signature to something like:
function requiredFieldValidator(value, input)
With that, you can get whatever attributes you want out of input with input.attr('validation-expression') or input.data... or whatever.