vuejs-tips / vue-the-mask

Tiny (<2k gzipped) and dependency free mask input for Vue.js
https://vuejs-tips.github.io/vue-the-mask/
1.72k stars 212 forks source link

Mask phone number with 10 or 11 digits #203

Open mrleblanc101 opened 1 year ago

mrleblanc101 commented 1 year ago

I have this mask, but I can't make it work properly.

<the-mask
  v-model="form.numero_telephone"
  type="tel"
  :mask="['(###) ###-####', '# (###) ###-####']"
  :class="{ 'is-invalid-input': errors.numero_telephone }"
/>

When I type exactly 10 number, it apply the 11 number mask. So 123 456 7890 is formatted 1 (234) 567-890# instead of (123) 456-7890

cesartagplus commented 1 year ago

I'm having similar issue, but only with firefox ...