pagarme-js
pagarme-js copied to clipboard
Problems validating cards
Description
The SDK is not fully validating cards leading our users to manually validate before sending data do the SDK.
For example there's no validation for an empty string being passed as card_holder_name to the card validator which should reject but instead it passes and than fails at the API level.
Expected Behavior
It should also invalidate empty strings.
I have the same issue. Some times I really need to validate manually this empty strings or strings with special character.
Forget about doing credit card validations with this library. Use it only for generating the cardHash. Add any other library layer before that better validates credit cards, such as https://github.com/braintree/card-validator