The validate
function does the following:
Extract and validate value of requested slot.
If nothing was extracted reject execution of the form action.
Subclass this method to add custom validation and rejection logic.
So, the validate
function does not only validate the value that is set, but it also checks if the user may want to reject the form and break out from it. If the requested slot was filled, the validate
function is calling the validate_slotxyz
functions.
So, if you just want to update the validation of the set value, I would recommend to overwrite the validate_slotxyz
function. If you want to add more/change the rejection logic, you should overwrite the validate
function.