logo

New Response

« Return to the main article

You are replying to:

  1. Hi Jake!

    I have been using your validator 3.0 for a few years now, and it's wonderful! I have come across something that I don't know how to deal with and am hoping that you can point me in the right direction.

    I have a field called End Date, which I need to validate in 2 ways:

    1. If a specific radio button selection has been made in another field, the End Date field needs to contain an entry.

    2. Regardless of anything else on the form, if an End Date is entered, it needs to be greater than the Start Date entry.

    As you can see, there would be separate messages for each of these, however they would both be generated from the End Date field, which is the problem I'm facing.

    I've tried to use {name: "endDate".....} twice in the list of validator fields, but that doesn't work as only one is actually used.

    I've tried to use Andrew Tetlaw's add.AllThese, in the validation.js file inside the "var Validator = ...." area, right below "has Selection", but I receive "Missing } after property list". I had thought I would then put Validator.addAllThese([ ..... directly below the } for the end of the validator, and then call it from inside "Validator.fields=..." in the JS Header area of the form.

    Am I on the right path, or totally off base?

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: