Credit card validation removes non-numeric characters and that causes wrong strings to be accepted.
Summary
the first line in IsCreditCard removes non numeric characters, and then the string "26f71e56d2e54fabae2ca87e5c524fef" passes as a credit card even though it clearly is not.
Bug Report
Credit card validation removes non-numeric characters and that causes wrong strings to be accepted.
Summary
the first line in
IsCreditCard
removes non numeric characters, and then the string "26f71e56d2e54fabae2ca87e5c524fef" passes as a credit card even though it clearly is not.Current behavior
IsCreditCard("26f71e56d2e54fabae2ca87e5c524fef")
returns trueExpected behavior
Remove only spaces and dashes instead of all non-numeric characters