Format your inputs content when typing – Cleave.js
Cleave.js has a simple purpose: to help you format input text content automatically. We don’t have to worry about handling it manually anymore. The idea is to provide an easy way to increase input field readability by formatting typed data. However, this isn’t meant to replace any validation or mask library. For that we still should still sanitize and validate data in our backend.
– Phone number formatting (i18n js lib separated for each country to reduce size)
– Credit card number formatting
– Date formatting
– Numeral formatting
– Custom delimiter, prefix and blocks pattern
– CommonJS / AMD mode
– ReactJS component
– AngularJS directive
npm install --save cleave.js
We need to have included (or imported) the scripts, as well place data input in our document.
You can adjust all of your cookie settings by navigating the tabs on the left hand side.
Strictly Necessary Cookies
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.