Closed micaelomota closed 4 years ago
This is related to the blank spaces. When do you set custom error messages the cardNumber keeps blank spaces, but if you did not set it the cardNumber doesn't keep the spaces.
With custom error messages:
Without:
Maybe we can change getCardNumberError
in validator.js
, adding a new line to remove blank spaces, something like that:
cardNumber = cardNumber.replace(/\s/g, '');
Fixed on 1.0.8
I'm following the example in https://github.com/medipass/react-payment-inputs#bootstrap
My code is exactly the same in the example:
after typing my real credit card number, the validation runs and sets the input as invalid.
this is the
meta
returned: