2 ms·
"JavaScript libraries like jQuery aren't well equiped to handle form input, so Creditcard.js uses the more robust and comprehensive Google Closure Tools, the he
by leeoniya 13y ago
"JavaScript libraries like jQuery aren't well equiped to handle form input, so Creditcard.js uses the more robust and comprehensive Google Closure Tools, the heavily tested JavaScript framework behind Gmail and Google Plus."
really? you're gonna do jQuery (+ all validation plugins) bashing for what? 5 fields + a luhn algo? please, take your snake oil elsewhere.
"the heavily tested JavaScript framework"? you must not follow jQuery's own pedantic development and testing, i would argue it is more heavily tested than Google's we-only-support-latest-2-versions-of-any-browser libs.
if anyone needs to do client-side cc pre-checks, there's a pretty up-to-date regex list [1] and a luhn implementation [2] which will get you 99.9% there. if you feel that the 0.1% (but probably much less) is worth a monthly licensing fee, you now have options :)
[1] https://github.com/Shopify/active_merchant/blob/master/lib/active_merchant/billing/credit_card_methods.rb https://github.com/Shopify/active_merchant/blob/master/lib/a...
[2] https://gist.github.com/ShirtlessKirk/2134376 https://gist.github.com/ShirtlessKirk/2134376