On Tue, Aug 16, 2011 at 10:16 AM, Scott Elcomb <[email protected]> wrote:

> On Mon, Aug 15, 2011 at 4:19 PM, Pete Otaqui <[email protected]> wrote:
> > As I get time, I'll be addressing the following points:
> >
> ...
> > * add more validation routines ... numberFormat is favourite and
> > although credit card number validation is in may ways desirable, I
> > think that it's complicated to do well, and probably more useful in a
> > very client-side focused library so I might leave that for a while
>
> This is not a complete solution but you may find it useful when
> looking to validate Credit Card numbers:
>
>  <http://en.wikipedia.org/wiki/Luhn_algorithm>
>
> There's a link to a JavaScript version (under 'Other Implementations')
> that's worth a peek at.
>

Thomas Fuchs contributed 140byt.es entries for both the Luhn 10 algorithm
and credit card type detection. Both are MIT licensed and under 140 bytes.

Luhn 10: <https://gist.github.com/976805>
CC Type Detection: <https://gist.github.com/978597>
140byt.es: <https://gist.github.com/962807>, <http://140byt.es>

Ben Barber

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to