APValidators icon indicating copy to clipboard operation
APValidators copied to clipboard

amex cvn (cvv) = 4 digits

Open rjpalermo1 opened this issue 8 years ago • 1 comments

Hi excited to try your control.

As I was evaluating noticed the CVV validation was limited to 3 chars and amex cards carry 4 chars. Sure I can adjust the 3 to 4 in regex but in order to keep user input errors to minimum is this something I can do with a compound object? I'm not sure, I'll dig in deeper but in meantime if you get this before i come up with answer what is your recommendation? Is there a flag or something I can evaluate to adjust the field object for the cc number? ie, isAmex (then I can set set CVV validator to 4)

rjpalermo1 avatar Aug 16 '17 18:08 rjpalermo1

Hi,

Please take a look at example. CVV validation is made there by APRegexValidator with ^[0-9]{3}$ regex. Regex to support 4 digits will be - ^[0-9]{4}$ . But maybe you would need to adjust this regex every time user changes CC number and you get CC type from APCreditCardValidator.

NickolaySheika avatar Aug 19 '17 11:08 NickolaySheika