GithubHelp home page GithubHelp logo

Comments (14)

c01nd01r avatar c01nd01r commented on June 16, 2024

+1

from v-mask.

ribamartins avatar ribamartins commented on June 16, 2024

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.

alicesouto avatar alicesouto commented on June 16, 2024

I try it @ribamartins, but It did not change anything.

from v-mask.

shaneeza avatar shaneeza commented on June 16, 2024

+1

from v-mask.

probil avatar probil commented on June 16, 2024

Hi, @alicesouto
I will check later today

from v-mask.

kcolls avatar kcolls commented on June 16, 2024

+1

from v-mask.

alicesouto avatar alicesouto commented on June 16, 2024

@probil Thanks! I hope hearing from you soon

from v-mask.

kcolls avatar kcolls commented on June 16, 2024

FWIW, the code pasted by @ribamartins worked for me. Make sure to replace the dist version and not src.

from v-mask.

alicesouto avatar alicesouto commented on June 16, 2024

Thanks @kcolls. It actually worked well!

from v-mask.

probil avatar probil commented on June 16, 2024

Re-opened until not merged. Changes will uppear in npm soon

from v-mask.

probil avatar probil commented on June 16, 2024

Thanks @alicesouto, @kcolls, @ribamartins

from v-mask.

c01nd01r avatar c01nd01r commented on June 16, 2024

https://niksmr.github.io/vue-masked-input/
Good component for input mask

from v-mask.

renanpro03 avatar renanpro03 commented on June 16, 2024

same here, waiting for merge. Thanks

from v-mask.

probil avatar probil commented on June 16, 2024

Should be fixed in v1.0.3. Please, check it out

from v-mask.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.