I've just noticed that, with MB installed, the #post form now has a novalidate attribute which it never had before. This now means that when custom attributes are set to 'required' for fields they get ignoreed. It also has the knock-on effect of making a custom validation plugin we created to extend the standard functionality to deal with visible/invisible fields is now useless.
Can this new 'novalidate' tag be removed please to allow standard validation to continue to work? If not, can you suggest a way to allow fields with the required attribute to continue to be validated in the normal way?
I've just looked into this further an I think there is another issue. We have a plugin that makes sure that image_advanced fields that have the 'required' attribute (and are visible) require the user to select an image.
I believe a recent update (5.2.8) has modified the validation scripts to remove validation for hidden fields (from changelog - Fix validation rules still applied for hidden fields). This now means that image_advanced fields (and similar) will never be validated as their relevant INPUT field (for the image_id in this case) is a hidden field. Can you modify the way your recent update works so that it does not target media fields such as image, file, video etc?
The form #post still validates fields which have checked option Required in MB Builder, see my screenshots
Regarding the field uses the input as a hidden field such as
image_advanced, thank you for pointing this out. I will discuss this with the developer team to create an update to cover this case.
Thanks for getting back to me so quickly. You are absolutely right about the visible required fields, it seems to be the upload type files (using hidden inputs) that have the problem. Standing by for the update so that we can restore this essential functionality.
Did this issue get resolved in the latest version of Meta Box?
We are trying to research and improve the validation to support the field
image_advanced, please wait for the next release.
Thanks for your patience.
Thanks Long, standing by.