Re: Form validation

From: Date: Fri, 03 Nov 2000 17:34:47 +0000
Subject: Re: Form validation
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-23607@lists.php.net to get a copy of this message
Hello Shane, On 01-Nov-00 11:02:36, you wrote: >I think I saw this answered before, or maybe in an archive somewhere, but I >can not find it. I aplogize for repetition. >How can I take the value of a text input field on a form and make sure it >only contains...say numbers, parenthesis, and hyphens if the field was for a >phone number? >I think it used eregi... Sorry for my ignorance here. :) Yes, but you need to study regular expressions to know how to validate each type of field. You may also want tu try this Form Generation and Validation PHP class that makes it easy to generate forms with several types of built-in validation types generating Javascript to validate the fields on the client side (browser) before the forms are submitted and also validating the fields on the server side in PHP with the functions of the class itself. 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 --

« previous php.general (#23607) next »