HTML required attribute validation issues

Support General HTML required attribute validation issues

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #19663
    wgstjfwgstjf
    Participant

    Hi guys,

    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?

    Cheers,

    Will

    #19665
    wgstjfwgstjf
    Participant

    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?

    Cheers,

    Will

    #19676
    Long NguyenLong Nguyen
    Moderator

    Hi Will,

    The form #post still validates fields which have checked option Required in MB Builder, see my screenshots
    https://share.getcloudapp.com/wbu0dAL2
    https://share.getcloudapp.com/bLue28y9

    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.

    #19684
    wgstjfwgstjf
    Participant

    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.

    Thanks again.

    Will

    #20200
    wgstjfwgstjf
    Participant

    Long,

    Did this issue get resolved in the latest version of Meta Box?

    Cheers,

    WIll

    #20207
    Long NguyenLong Nguyen
    Moderator

    Hi,

    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.

    #20213
    wgstjfwgstjf
    Participant

    Thanks Long, standing by.

    Cheers,

    Will

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.