RE: [PHP] Form Validation
| From: | Manuel Lemos | Date: | Sat, 18 Nov 2000 19:54:05 +0000 |
| Subject: | RE: [PHP] Form Validation | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-26074@lists.php.net to get a copy of this message | ||
Hello Maciek,
On 17-Oct-00 10:00:57, 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.
Ok, I have just added two options ValidateOnlyOnServerSide and
ValidateOnlyOnClientSide to achieve that with the current AddInput
function. Please hang on because I am about to release a new version
also with features needed to better support a new class for multi-page
forms that I will release afterwards.
>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 those are internal flags to tell if the input will need server or
client side validation. In some cases you need to do more than just
adjusting those flags.
>> -----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
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
--