RE: [PHP] Form Validation
| From: | Maciek Uhlig | Date: | Tue, 17 Oct 2000 13:00:57 +0000 |
| Subject: | RE: [PHP] Form Validation | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-20610@lists.php.net to get a copy of this message | ||
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.
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.
Maciek
> -----Original Message-----
> From: Manuel Lemos [mailto:mlemos@acm.org]
> Sent: Sunday, October 15, 2000 7:56 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Form Validation
> But if you want to perform this and other types of validations both on
> server side (PHP) and client side (Javascript) you may want to
> try this PHP
> class that does that for you.
>
> http://phpclasses.UpperDesign.com/browse.html/package/1