Conditional Validation

10/29/2009 3:25 pmEric Mittman

I think you could do this with a server side validation, but you will need to customize the trigger for it.

You would want to add in a server side validation from the server behaviors menu, for the trigger you should choose the select list you want to check the value of to see if you need to validate the other field.

Next you would choose the validation type and form field to conditionally validate based on this.

Once you have configured it you will need to customize the trigger for it, rather than just checking the isset for the posted element you will also need to check to see if it's value is equal to the value you are looking for. If it is then the validation will run against the field, otherwise no validation will occur for that form field.

This is a somewhat custom implementation of the server side validations for this situation. There are other more custom ways you can do this if you need to also incorporate other server validations on the page. Let me know if you have any further questions on this.

0

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.