RE: [PHP] Form Validation
| From: | Manuel Lemos | Date: | Sat, 28 Oct 2000 17:24:35 +0000 |
| Subject: | RE: [PHP] Form Validation | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-22461@lists.php.net to get a copy of this message | ||
Hello Maciek,
On 17-Oct-00 10:01:24, you wrote:
>I have to admit I was slightly confused while I was starting to explore the
>class. I found it's impossible to switch off client side verification in
>order to leave verification for the server (or, I didn't find a simple way
>to do it). Taking test_form.html as an example, in case of email
>verification for instance, I found in forms.php:
>$input["ServerValidate"]=$input["ClientValidate"]=$input["ValidateAsEmail"]=
>1;
>which effectively forced client verification (which I didn't want).
>Temporarily I changed the above to:
> $input["ServerValidate"]= $arguments["ServerValidate"];
> $input["ClientValidate"]= $arguments["ClientValidate"];
> $input["ValidateAsEmail"]=1;
>and now I can control (setting ServerValidate or ClientValidate to 0 or 1)
>at which side (or both, or not at all) the verification is supposed to
>happen.
It never crossed my mind that anybody could want to just do server side
validation of e-mail addresses. Client side validation is important to
prevent multiple form submissions until fields are valid.
If you give me a good reason for just wanting server side e-mail validation,
I might add some option to do so.
Meanwhile you may want to check the ValidationServerFunction option to
supply your own form input validation function that only work on the server
side.
>Still, I don't know why these AddInput arguments are not mentioned in
>forms.html docs, and if they at all are expected to work the way I forced
>Manuel's form class to act.
Because they are not quite arguments but rather flags that I need to set to
figure if client side validation is needed in any of the form inputs.
Regards,
Manuel Lemos
Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
--
E-mail: mlemos@acm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--