RE: [PHP] Form validation
| From: | Miguel Cruz | Date: | Thu, 25 Apr 2002 23:20:04 +0000 |
| Subject: | RE: [PHP] Form validation | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-94693@lists.php.net to get a copy of this message | ||
On Thu, 25 Apr 2002, John Holmes wrote:
> I'd recommend putting your validation and formatting together, too. I
> hate it when some people enter names into my database in all caps, and
> some all lowercase. So in my validation routine, I make sure that the
> name is only letters, (except for a possible ' for last names like
> O'Reilly), and then do the formatting by making just the first letter
> uppercase.
Some names (certain Dutch surnames come to mind) aren't spelled with an
initial cap.
> Same thing for phone numbers and social security numbers for example.
> You can validate and accept the input in a variety of formats, but have
> the validation routine return them in a common format to insert into the
> database.
Yup.
miguel