This Forge component integrates Max Huang’s JavaScript library cleave-zen, which is the successor of his deprecated library cleaveJS.
This integration allows automatic formatting of credit card numbers, dates, times, numeral values and custom block formats. The component supports the following two usage scenarios:
- Use the CleaveZen_* widgets to limit and format texts in form input controls while typing.
- Call CleaveZen_Format* client actions to format texts in your client flows.
Furthermore, there are additional client actions to get specific infos or unformat texts. For each type (*) there is a specific CleaveZen_Format*Options structure to configure the formatting.
For more details on options please refer to the cleave-zen git repository: https://github.com/nosir/cleave-zen
Also included is a demo application that shows how to use the widgets and lists all public client actions.