Hi Darby,

The Zend_Validate_Ccnum is only one application of the Luhn algorithm, I
would have thought the Luhn class would be separate from the Validate class?
There is an application to generate check digits for account numbers etc.
The same applies to Verhoeff, validation is not the only purpose.

On the note of the Zend_Validate_Ccnum class, what if we wanted to
automatically detect what credit card was being used (based on
numbers/length)? While Zend_Validate_Ccnum would be good for ensuring a card
is a particular type (and that the check digit is correct) is this the place
for code to figure out what the card type is?

Sorry if this is obvious to everyone else but it seems to me that there is
need for a utility class area to feed things like validation, but also be
used elsewhere.

Cheers,
Steven

-----Original Message-----
From: Darby Felton [mailto:[EMAIL PROTECTED] 
Sent: Friday, 1 February 2008 11:24 PM
To: Steven Brown
Cc: 'Zend Framework General'
Subject: Re: [fw-general] Addition of utility classes to ZF

Hi Steven,

We have an implementation of the Luhn algorithm within
Zend_Validate_Ccnum, though I'm pretty sure we have not implemented the
Verhoeff algorithm anywhere. (Please correct me if I'm wrong, anyone.)

I think that such validation may fit nicely into the Zend_Validate
"namespace", but if you are interested in contributing this and other
utilities to Zend Framework, please see:

http://framework.zend.com/community/contribute

for more information. Probably it would be good to describe the
utilities and getting some more feedback before making any judgment
about whether they would be worth including. :)

There is also a proposal process for making ZF contributions:

http://framework.zend.com/wiki/display/ZFPROP/Home

Thank you for your interest in contributing to Zend Framework! :)

Best regards,
Darby

Steven Brown wrote:
> Hi all,
> 
> I was just about to create some utility classes for Luhn (MOD10) and
> Verhoeff check digit generation and checking. Is this the kind of thing
that
> might fit into ZF somewhere and if so where?
> 
> There are a whole heap of utility classes I use outside of ZF that are
> sometimes incompatible or not in the coding standard of ZF, is there much
> point in converting these and contributing them to ZF?
> 
> Cheers,
> Steven
> 
> 
> 


Reply via email to