jondavidjohn / payform

:credit_card: A library for building credit card forms, validating inputs, and formatting numbers.
https://jondavidjohn.github.io/payform/
Other
427 stars 81 forks source link

Add Dinersclub 309 prefix validation #57

Open ghost opened 5 years ago

ghost commented 5 years ago

It solves the issue https://github.com/jondavidjohn/payform/issues/56

according to this document https://en.wikipedia.org/wiki/Payment_card_number Dinersclub International could starts with 309 Thanks, Francesco

ddayguerrero commented 5 years ago

Hi @FrancescoColonna! This is good! We've recently made changes to our BIN patterns and documented everything under CARDRULES.md. Do you mind adding tests in test/validateCardNumber_spec.coffee and possible source associated to the Wikipedia page?

ghost commented 5 years ago

Hi @ddayguerrero i've added a basic test in test/validateCardNumber_spec.coffee and a reference to Wikipedia in CARDRULES.md Please let me know if i can help in some other ways. Thanks for your job! Francesco

ddayguerrero commented 5 years ago

Looks good to me! Before we move on, can we omit all generated distribution files from the list of staged changes? (dist/payform.js and dist/payform.min.js)

frappacchio commented 5 years ago

Hi @ddayguerrero i've removed dist/*.js files from staged changes. Please let me know if everything it's ok. Thanks, Francesco

ddayguerrero commented 5 years ago

Sorry, I wasn't clear earlier. What I meant is to keep the files on disk, but remove the changes from the git change log. Something along the lines of doing git rm --cached

We should end up with 3 files changed:

src/payform.coffee
test/validateCardNumber_spec.coffee
CARDRULES.md

I truly appreciate your time and effort in creating this PR, but it is only best that we follow the guidelines shared by @jondavidjohn

ddayguerrero commented 5 years ago

Will close as soon #59 is merged