skeuocard icon indicating copy to clipboard operation
skeuocard copied to clipboard

Validation for AMEX cards

Open jgemedina opened this issue 11 years ago • 6 comments

When testing an AMEX card I enter some invalid data and immediately get the red borders meaning there is something wrong with the input.

However if I enter valid data or the test card number shown in the Skeuocard page, the UI tells everything is ok, green borders and everything, but the isValid() function tells the contrary.

I got this error with the test card number on the page, and my own card.

jgemedina avatar Oct 11 '13 06:10 jgemedina

+1

mikejihbe avatar Oct 20 '13 23:10 mikejihbe

You guys are absolutely correct; great catch. In the isValid function I'm checking to ensure that neither front nor back faces have the invalid class applied -- but in the case of the front-side CCV of the AMEX, the invalid class is being applied to the back face extraneously.

I'll get on fixing this ASAP. Thanks a lot!

kenkeiter avatar Oct 21 '13 06:10 kenkeiter

is a fix for tihs issue to be fixed soon? or is it out there already?

jgemedina avatar Dec 16 '13 07:12 jgemedina

My quick fix:

Skeuocard.prototype.isValid = function() {
  return !this.el.front.hasClass('invalid') 
    && (!this.el.back.hasClass('invalid') || !this._inputViewsByFace['back'].length);
};

EmeryEx avatar Jan 13 '14 21:01 EmeryEx

@kenkeiter is there are ETA for this bug?

jgemedina avatar Mar 02 '14 00:03 jgemedina

+1

MatayoshiMariano avatar Dec 30 '14 18:12 MatayoshiMariano