vue-directive-mask
v1.3.0
Published
Simple mask input directive for Vue.js
Downloads
4
Readme
@vuejs-community/vue-directive-mask
Simple mask input directive for Vue.js
Installation
install from npm
$ npm install @vuejs-community/vue-directive-mask
and register in you Vue app
import Vue from 'vue';
import VueDirectiveMask from '@vuejs-community/vue-directive-mask';
Vue.use(VueDirectiveMask);
Usage
<template>
<div>
<!-- Ukrainian date format -->
<input type="text" v-mask="'##.##.####'">
<!-- Ukrainian phone format -->
<input type="tel" v-mask="'+380 ## ###-##-##'">
</div>
</template>
Format Options
| Key | Type |
| --- | ----------------------- |
| #
| Number |
| A
| Latin letter |
| N
| Number and latin letter |
| X
| Any |
License
MIT © Vue.js Community