Simple input mask lib for vue.js based on PureMask.js
This version requires Vue 1.X. If you are looking for Vue 2.X, check it here.
npm install [email protected]
import Vue from 'vue
import VueMask from 'v-mask'
/** Activate vue.js plugins **/
Vue.use(VueMask);
Now you are ready to use it in the code!
<input type="text" v-mask format="####-##">
<!-- OR -->
<input type="text" v-mask format="##/##/#### ##:##" >
List of supported placeholders:
| Value | Format |
|---|---|
| # | Number (0-9) |
| A | Letter in any case (a-z,A-Z) |
| N | Number or letter |
| X | Any symbol |
In TODO
PR is welcome!