Custom Fields
Support General Passing dependency-callback to Validation `required`

  • Creator
  • #24803
    Resolved Austin Passy

    According to the docs for jQuery Validation: you can pass a dependency-callback which returns a boolean value on condition. I am aware from PHP passing the validations rules array gets JSON encoded. So the final output would look something like {"rules":{"programs":{"required":"function() { return $('#taxonomy').val() != '224' }"}}}

    It would be great to add a feature to process the encoded script data and check for some kind of format prefix to convert to JS.

    I've seen some examples out there, but haven't tested or validating any thoroughly. Just adding in some feedback, without having to implement my own validation script.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.