Re: Validation class comments
| From: | Pierre-Alain Joye | Date: | Tue, 28 May 2002 21:27:31 +0000 |
| Subject: | Re: Validation class comments | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-6548@lists.php.net to get a copy of this message | ||
On 28 May 2002 20:55:34 +0200
"Tomas V.V.Cox" <cox@idecnet.com> wrote:
> I'm talking about performance not easy of use :-)
As usual, hard to make compromises between modularity and performances.
Basically, the core validation should contain the following :
Basic types :
string
email (optional MX check (calls network container) )
reserved words ( must have words[] )
regexp
min length
max length
commonly used algos ( string algo stuffs like a std checksum with key
incuded )
url's
others ?
numeric
interval [min,max]
precision (decimal)
commonly used algos (luhn, ... )
And the 2nd level we would find :) :
extended numeric :
number localized ( "1'000'000.23","1 000 000.23",
"1,000,000.23",...)
currencies ("CHF 10'000,23") ( uses number localized and string)
extended string :
rarely used algos
network
DNS ( MX, www)
others ?
Complex types
dates base ( std numeric "4/23/2002" "23.4.2002",...)
extended dates ( ISO, human readable )
Nth Level
XML:
A way to define complex rules with a xml, something like powerforms
rules definition. To control the validation flows (an item makes another
mandatory,...).
Maybe it will be usefull to get a convert tool used by Validate or any
others pear modules. Validate may certainly be used to validate data
from forms ( :) ), and certainly during an import csv file ( callback by
file::csv b.e. ) or from a soap server to check client data. This will
create the need of en/decode functionnalities.
Anyway, we should start the core :). A lot of work has been done in
QuickForm, OOH_Forms, SOAP, we can try to get back the code ?
just ideas,
pa