Topic: mdbCreditCard and mdbCvv
Hi,
Since the documentation about mdbCreditCard and mdbCvv in https://mdbootstrap.com/docs/angular/forms/auto-format/ is missing, I would like to know some more about what those directive do and appreciate an example.
Perhaps I saw somewhere that a logo for the CC appears ?
Do they check CC number validity ?
Thanks
Arkadiusz Idzikowski staff answered 6 years ago
Hello,
mdbCreditCard and mdbCvv can be used to format data automatically as the user type (mdbCreditCard will detect card type based on the entered number). Those directives doesn't have any custom validators in current version. There is a link to live preview at the top of the documentation page.
mdb2 pro answered 6 years ago
Thanks,
I missed the link to the preview.
So basically it just adds spaces between 4 digits and limits the length ?
Do I have to add an additional card to set the length ?
Arkadiusz Idzikowski staff commented 6 years ago
It also detect card type and format the number accordingly to the type (because not all numbers are the same length and are formatted a bit differently).
Could you add more details to the question? I'm not sure if I understand what you need to do with this directive.
mdb2 pro answered 6 years ago
Nice !
I liked how the length is determined by the card number
I still don't get what mdbCvv does ?
Arkadiusz Idzikowski staff commented 6 years ago
It simply formats the data by limiting the number of digits entered (some cards use 3 digits and other 4). We will consider adding custom validators for those directives in the future.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: 6.2.3
- Device: NA
- Browser: NA
- OS: NA
- Provided sample code: No
- Provided link: No