Re: Quickform validation

From: Date: Mon, 28 Nov 2005 08:18:48 +0000
Subject: Re: Quickform validation
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22090@lists.php.net to get a copy of this message
A nasty hack would be to add a 'space' to the text field if the appropriate option is selected. Should pass client rules, but not server rules if you add a trim filter to the text field (need to test). (ps sorry marek for the double post I just realized my email client had a 'reply to all' button.... shame on me) Le 28 nov. 05, à 04:58, Marek Narkiewicz a écrit :
Hi there. I have a problem with quickform in that I need a field to be required, only in the event of another field (a select box) being set to a certain value. I made a function to do this and registered it as a rule, but of course this is never used as empty fields are not validated. I can't simply set the field to required as it is only required in certain circumstances. An example of this is a postcode field which is only required in the event of a country select field being set to the value 'UK'. In all other circumstances it is not required. Could anyone suggest a way to do this with quickform? Many thanks. Marek -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php \ | /
Arnaud Sellenet-Bodin Dév et dés http://demental.info Tel : 05 63 55 24 46 / | \

« previous php.pear.general (#22090) next »