Re: Validate package API proposal

From: Date: Sun, 16 Feb 2003 17:57:39 +0000
Subject: Re: Validate package API proposal
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-13379@lists.php.net to get a copy of this message
On Sun, 16 Feb 2003 18:52:36 +0100 Bertrand Mansion <bmansion@mamasam.com> wrote: > Hi Pierre, > > The Validate package could be used with QuickForm to validate form > data. At the moment, QuickForm can use it successfully, but because > the Validate methods API is always different from one method to > another, there are only a small number of methods that QuickForm can > work with. > So, if, instead of using function rib($aCodeBanque, $aCodeGuichet, > $aNoCompte, $aKey), you use an array with 4 keys as first parameter, > that would make it easy for QuickForm users to use the Validate > package. The problem is these value could change a lot from a bank to another, with no real constant string format, but these different values are always there. But you can pass an array as the 1st argument which contains each key/value pair. This is implemented in every function to allow the Validate::multiple() calls. Multiple allows you to make a single call with as many values to check you need. > In summary, I would suggest that you use functionName($valuesToTest, > $optionsForValidation) as a common access to all validation functions. Does multiple fit your needs ? Thank's pierre

« previous php.pear.dev (#13379) next »