Open caruccio opened 10 years ago
Thank you for addressing this issue. I was struggling with validating AmEx. Needs to be merged
I did run into an issue, though, where if you were trying to validate before the card had began rendering, or before this.product
exists, as I see it, the validation using card.isValid() would throw an error because this.product
cannot be found. For example if you tried to submit before ever touching the "card". I altered your addition like so:
if (this.product) {
if (this.product.faces === 'both') {
return !this.el.front.hasClass('invalid') && !this.el.back.hasClass('invalid');
} else if (this.product.faces === 'front') {
return !this.el.front.hasClass('invalid');
} else {
return !this.el.back.hasClass('invalid');
}
} else {
return false;
}
This seems to be working for me, so far.
When can we expect a new release with this change?