jQuery Validate still validating fields that hidden

Support MB Conditional Logic jQuery Validate still validating fields that hiddenResolved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #18668
    Sofyan SitorusSofyan Sitorus
    Participant

    There is a case I need to hide a field using MB Conditional Logic and set it as required, and the validation should executed only when the field is visible.

    I created a pull request in GitHub for the fixes:

    https://github.com/wpmetabox/meta-box/pull/1361

    #18669
    Anh TranAnh Tran
    Keymaster

    Hi Sofyan,

    Thanks a lot for your help! I've merged your PR!

    #20334
    Ryan LauritsenRyan Lauritsen
    Participant

    Anh, does this apply to fields hidden via the CSS display: none;?

    We have some fields that are hidden using that method but still need validation (they are populated programmatically with some custom javascript). It was working fine but this or some other recent change has broken it. If I remove display: none; the validation works.

    #20336
    Long NguyenLong Nguyen
    Moderator

    Hi Ryan,

    Recently we've created an update to validate the field if it is visible. If a field is hidden by conditional logic, it will be ignored when running the validation. I'm going to create a request to support this case if the user needs to validate the hidden fields.

    #20340
    Ryan LauritsenRyan Lauritsen
    Participant

    Long Nguyen, when will this fix be ready?

    This has totally screwed up our data coming through multiple front-end forms and we need an immediate fix. Do I need to revert to an old version or is there a change I can make to the code to revert this temporarily until a fix is released.

    #40043
    justdoit123justdoit123
    Participant

    Any update??

    If a field is hidden by conditional logic, it will be ignored when running the validation.

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