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

More flexible creditCard validation #5122

Closed
wants to merge 1 commit into from

Conversation

designosis
Copy link

You've done a spectacular job of credit card validation.
But the code forces unnecessary conditions:

  1. Users must enter credit cards without dashes
  2. UX improvements which allow user-friendly credit card entry are by design invalid (such as js formatter ... demo here)

I've added one line of code to strip non-numerics before validation, returning control to the developer.

@jlukic
Copy link
Member

jlukic commented Mar 13, 2017

I do agree dashes are reasonable to include in credit card strings. I dont believe we should validate other strings as correct though (a-Z etc).

I'll add with a slight change see 31b28a1

@jlukic jlukic closed this Mar 13, 2017
@jlukic jlukic added this to the 2.2.10 milestone Mar 13, 2017
@designosis designosis deleted the next branch March 30, 2017 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants