jQuery.payment
There are several incorrect assumptions about this library<p><pre><code>  Cards can be up to 19 digits
  Bin ranges are constantly updated, so cardType in static code is a broken concept.
  I expect in the future American Express will issues cards longer then 15 digits.
  Minimun card length is 13 digits not 10
</code></pre>
I don't feel like validating the luhn check, but historically I've seen systems that don't correctly handle the luhn check of variable sizes.<p>Edit: Reference material <a href="http://en.wikipedia.org/wiki/Bank_card_number" rel="nofollow">http://en.wikipedia.org/wiki/Bank_card_number</a>
If you are actually getting into credit card processing, please talk to your acquirer about data feeds of this type of info on bin ranges.<p>Edit 2: Wikipedia claims Maestro has 12 digit cards, but I've never seen one in the wild, I could be wrong about 13, but it's the assumption we've made processing international payments.