kenkeiter/skeuocard — pull request #147 by bi1yeu (2014-08-16 03:11:17+00:00)
Title: Fixes for programmatically setting fields and invalid Amex cards

**Description**
This PR addresses two issues (maybe should've been two separate PRs but \*shrug\*).

- Programmatically setting exp, name, and cvc
- Expiration date would be invalid if you tried to programmatically set either the exp month or exp year when the other wasn't already set. A date object is created from the provided value, and if either of those values is undefined, it'll be ```NaN```, and the resultant date object will be invalid. This simple fix trivially sets an unset month or year to January or 1900, respectively.
- Looked like there was a logical error when setting the ```name``` and ```cvc``` input views. Both were being associated with the ```exp``` input view.

- Amex cards (or any card without back face inputs) were failing the ```isValid()``` test. Issue #106. Borrowed fix idea from one of the comments there.

**Functional Tests**
- Programmatically input expiration month, expiration year, name, and cvc with no errors
- Ensure ```isValid()``` returns true for valid Amex cards and false for invalid Amex cards