RE: [PEAR-DEV] Validation class
| From: | Richard Heyes | Date: | Wed, 10 Apr 2002 23:33:50 +0000 |
| Subject: | RE: [PEAR-DEV] Validation class | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-5320@lists.php.net to get a copy of this message | ||
> what do u think of having a validation class inside PEAR,
> which validates various stuff,
> such as:
> - check if value is a number
is_numeric()
is_int()
is_integer()
is_long()
> - check if value exists at all
!empty()
> - check if value is at least X characteers long
strlen() > X
> - check if value is a proper date
Hmm.
> - check if value is a proper email address
Mail/RFC822.php
> i would need this currently for form checking.
> i know there is OOH-Forms, but imagine to use it for any kind of
> stuff, not just form validation ...
But some sort of validation class would be nice. One that could maybe
apply these and more complex tests to all of $_REQUEST or $_POST in
one go would be interesting.
--
Richard Heyes
"If you have any trouble sounding condescending,
find a Unix user to show you how it's done." - Scott Adams