Shopify/active_merchant — pull request #1171 by duff (2014-05-06 19:06:42+00:00)
Title: Improve credit card validation

Previously, if you specified an invalid card number and you specified a
nil brand, you'd get two validation messages:

* card type can't be blank
* number is invalid

When your form doesn't allow you to specify a brand, that first error
message is confusing to users.

So now, we only validate the brand if the number is legitimate.