Form Validation - Payments - Determining type of card entered #1904
-
I'm putting together a form with validation to ensure the user inputs specific card types (Visa, Mastercard, Amex, etc.) but I would also like to detect what kind of card the user has input once it's been deemed valid. I'm using the documentation here: https://fomantic-ui.com/behaviors/form.html#payment I just can't seem to find a way to extract what kind of card it is from Fomantic once it passes the validation. Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You may have to check the regexes from the validation function. I prepared a little example which does what you need. Feel free to adopt and change it according to your needs |
Beta Was this translation helpful? Give feedback.
You may have to check the regexes from the validation function. I prepared a little example which does what you need. Feel free to adopt and change it according to your needs
https://jsfiddle.net/lubber/hzt017q3/13/