asaskevich / govalidator

[Go] Package of validators and sanitizers for strings, numerics, slices and structs
MIT License
6k stars 556 forks source link

fix credit card bug which accepted string alphabets #416 #420

Open mohammadrezaabdi opened 3 years ago

mohammadrezaabdi commented 3 years ago
Bugfix: master branch #416 | Q | A |-------------- | ------ | Documentation | no | Bugfix | yes | BC Break | no | New Feature | no | RFC | no | QA | no ### Description now the Credit card validation rejects non-numeric characters and just accept spaces & dashes which are placed individually Example: these following credit cards returned false:
"26f71e56d2e54fabae2ca87e5c524fef"
"26715--62542--875524"
"26715   625428755  24" 
"26715 -62542-875524"
sergeyglazyrindev commented 2 years ago

Hello guys! I forked this package cause owner disappeared. Hope, he will be back, but it would be easier to merge these changes back if he is back Link to my repo: create issue there and we'll discuss it.