[development] Formproc: duplication of effort?

Adrian Rossouw adrian at bryght.com
Thu Nov 17 10:03:31 UTC 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On 17 Nov 2005, at 6:11 AM, Gordon Heydon wrote:

> Hi,
>
> I read through all the screen shots and it all looked very familiar.
>
> I think it is a case of great minds thinking a like. I say that  
> because
> the formapi is stroke of genesis, and not the other end of the scale.

It does however contain validation functions. Which we can re-use for  
the current form api.

Also, there seems to be database merging things too.

This is why it's better if people develop things in the open. (deps)




/**
* Rule: numeric value.
* All characters must be digit, comma, dot, or minus.
*
* @ingroup formproc_rules
* @param string $val
* @param string $msg
* @return string
*/
function formproc_is_numeric($val, $msg = null) {
   if (!strlen($val)) { return false; } // accept empty string
   return preg_match('/^[\d\.,\-]+$/', $val) ? false :
     $msg !== null ? $msg : t('Must be a number.');
}








>
> Gordon.
>
> On Wed, 2005-11-16 at 22:26 -0500, Khalid B wrote:
>> Looks to me that this duplicates the form  API in 4.7.
>>
>> Formproc project
>> http://drupal.org/node/37543
>>
>> I sent him an email...
>>
>> !DSPAM:437c019772912003247560!
>>
>

- --
Adrian Rossouw
Drupal developer and Bryght Guy
http://drupal.org | http://bryght.com


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFDfFV0gegMqdGlkasRAm6+AJ9ZgI5QqBTGcmUCk/JVYVhOkjPf1ACg4s+w
lUZy+obtR9mmx/LoDKaPE6Y=
=2xq0
-----END PGP SIGNATURE-----


More information about the development mailing list