beforeValidate
fires before the control value is validated
beforeValidate: (value: object) => boolean | void;
Parameters:
value: object- the value to be validated
Returns:
Return false to cancel the default action of the event; otherwise, true.
Example
form.getItem("avatar").events.on("beforeValidate", value => {
console.log("beforeValidate", value);
return value.src; // if there is a path to the image, validation will be passed
});