swell.card.validateExpiry not working as expected #218
-
Hello, I'm using swell.card.validateExpiry method to validate my card and it always returns 'false' regardless of input (i'm using documentation example) Other methods like card number and cvc validators are working fine and return true |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
@Ramxnchv I've created a task for the team to look into this. I'll be able to provide updates as we investigate the issue. |
Beta Was this translation helpful? Give feedback.
-
@Ramxnchv The function signature is different than in your example. Try this:
|
Beta Was this translation helpful? Give feedback.
-
@ericingram Thanks, i think the problem is in src/card.js the validateExpiry function receives 2 arguments but in types/index.d.ts it receives only one string. Anyway since all these validations are called inside the createToken function this is not really important, I just wanted to display errors to the user before submitting the form |
Beta Was this translation helpful? Give feedback.
@Ramxnchv The function signature is different than in your example. Try this: