Postcode Validator Problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Postcode Validator Problem

Bas Kamer
Hello,


I have a form that contains a select field with country codes and a postcode field.

The postcode field is validated with the postcode validator base on the selection in the country select box.

This works fine, until one chooses a country that the validator can't handle. In my case 'sr' as addresses in Suriname do not have postcodes...

The Validator then throws an exception which my callback validator catches... I can validate when this happens, but I would alos like to set the required flag for that field to false, as in that case the postcode may be omitted.


I other words is it possible to set the requirement flag conditional on the result of a validator?

help would be appreciated


bas