Skip to content

Conversation

@caruccio
Copy link

@caruccio caruccio commented Jun 9, 2014

No description provided.

@TheRyanBurke
Copy link

When can we expect a new release with this change?

@estenp
Copy link

estenp commented Apr 28, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants