(abstract)

So, I have a form with multiple submit buttons. The different
submission types require different subsets of data input within a
single form, and therefore have different requirements as to what is
required. All of the examples for the validation plugin involve all
values in a form being validated on the form's submission.

I made an object of the following form to specify what validations
should occur dependent on the submit button.

{
  "name of form(1...N)": {
    "name of submit-button(1...N)": {
      "name of field(1...N)" {
        [validation conditions]
      }
    }
  }
}

I want to validate on submission, but I've come to a mind circus about
how to accomplish that. Essentially I want to mark fields as required
depending on whether the validation event was triggered by a specific
submit button. I'll probably end up creating crafty closure code to
work through this, but I believe this would probably be useful as a
use case for future development.

Reply via email to