Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amex cvn (cvv) = 4 digits #9

Open
rjpalermo1 opened this issue Aug 16, 2017 · 1 comment
Open

amex cvn (cvv) = 4 digits #9

rjpalermo1 opened this issue Aug 16, 2017 · 1 comment
Assignees

Comments

@rjpalermo1
Copy link

rjpalermo1 commented Aug 16, 2017

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)

@NickolaySheika
Copy link

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.

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

No branches or pull requests

2 participants