JS Filters
lzb.editor.control.validate
Called after validating control value. You may add your additional checks for the required controls.
Attributes
Name | Type | Description |
---|---|---|
data | Object | validation data with message |
val | Mixed | control value |
control | Object | control data |
Additional Filters
Name | Description |
---|---|
lzb.editor.control.CONTROL_TYPE.validate | specific controls only |
Usage
JS
wp.hooks.addFilter(
"lzb.editor.control.validate",
"my.custom.namespace",
function (data, val, control) {
console.log(data, val, control);
return data;
}
);
JS
wp.hooks.addFilter(
"lzb.editor.control.checkbox.data",
"my.custom.namespace",
function (data, val, control) {
console.log(data, val, control);
return data;
}
);