Comments (14)
+1
from v-mask.
Hi,
Replace the code in the format.js file with the code below:
==============================================
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (data, mask) {
if (!mask) return data;
var text = '';
for (var i = 0, x = 1; x && i < mask.length; ++i) {
var c = data.charAt(i);
var m = mask.charAt(i);
switch (m) {
case '#':
if (/\d/.test(c)) {
text += c;
} else {
x = 0;
}break;
case 'A':
if (/[a-z]/i.test(c)) {
text += c;
} else {
x = 0;
}break;
case 'N':
if (/[a-z0-9]/i.test(c)) {
text += c;
} else {
x = 0;
}break;
case 'X':
text += c;break;
default:
text += m + (data.length == 1 ? c : '');break;
}
}
return text;
};
from v-mask.
I try it @ribamartins, but It did not change anything.
from v-mask.
+1
from v-mask.
Hi, @alicesouto
I will check later today
from v-mask.
+1
from v-mask.
@probil Thanks! I hope hearing from you soon
from v-mask.
FWIW, the code pasted by @ribamartins worked for me. Make sure to replace the dist version and not src.
from v-mask.
Thanks @kcolls. It actually worked well!
from v-mask.
Re-opened until not merged. Changes will uppear in npm soon
from v-mask.
Thanks @alicesouto, @kcolls, @ribamartins
from v-mask.
https://niksmr.github.io/vue-masked-input/
Good component for input mask
from v-mask.
same here, waiting for merge. Thanks
from v-mask.
Should be fixed in v1.0.3
. Please, check it out
from v-mask.
Related Issues (20)
- Underscores ("_") break all masking HOT 2
- Dependency Dashboard
- Error using v-mask function in vuetify component HOT 2
- The mask doesn't work when you manually replace selected text HOT 1
- e.initEvent is deprecated
- Place holder optional (?) not working HOT 1
- How to deal with ip addresses HOT 3
- Is it possible to use pipes? HOT 1
- mask not working with ctrl a + ctrl v HOT 2
- The last 4 digits of the phone number are not hidden. The first 4 digits at the beginning of the number go to the end.
- Using v-mask in a text-area field HOT 1
- Editing v-text-field with phone number mask (NNN) NNN-NNNN causes cursor to move to end of field
- Masked input affected by typing in another field in case using function for v-mask HOT 1
- Bug when replacing through selection #1
- Bug when replacing through selection #2
- Vue.filter is not a function ? HOT 3
- input with mask cut value and add some number
- Prevent field clean when changing mask
- The automated release is failing 🚨
- Question / Feature : Help Needed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from v-mask.