pagarme-js icon indicating copy to clipboard operation
pagarme-js copied to clipboard

Problems validating cards

Open lucianopf opened this issue 6 years ago • 2 comments

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.

lucianopf avatar Feb 28 '19 14:02 lucianopf

I have the same issue. Some times I really need to validate manually this empty strings or strings with special character.

duduneto avatar May 31 '19 02:05 duduneto

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

luccasmaso avatar Mar 25 '20 15:03 luccasmaso