Vuetify: [Bug Report] Text Field's Mask for non-english characters (letters)

Created on 1 Jun 2018  路  6Comments  路  Source: vuetifyjs/vuetify

Versions and Environment

Vuetify: 1.0.18
Vue: 2.5.2
Browsers: Chrome 67.0.3396.62
OS: Linux x86_64

Steps to reproduce

  1. Go to link
  2. Try to input any non-english letter

Expected Behavior

In accordance with Mask Legend for Text Field, Mask A is supposed to mask any letter (not only English).

Actual Behavior

Mask A for Text Field is supporting only English letters.

Reproduction Link

https://codepen.io/algiorgio/pen/xzwxvO

wontfix

Most helpful comment

@algiorgio I wasn't suggesting using it in the mask. This regex expression is what can allow Vuetify developers to implement support for other languages in the mask

All 6 comments

Confirmed on other browser:

  • Firefox Quantum 61.0b10
  • Safari 11.1.2
  • Opera 53.0.2907.68

Javascript's version of regex doesn't support non-English letters. You can use \w only to match English words. I'd suggest doing something like this:

/[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\w]+/g

Here's a small demo: https://regexr.com/3qis0

Mask for v-text-field has restricted format.
Where do you suppose to place these Unicode's ranges?

v-text-field(label='Name' mask="/[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\w]+/g")
???

@algiorgio I wasn't suggesting using it in the mask. This regex expression is what can allow Vuetify developers to implement support for other languages in the mask

Thanks for the suggestion, but we aren't planning to add any more functionality to masks at this time.

Very sad regexp would be very helpful. because now two way filter is gone by vue2.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dohomi picture dohomi  路  3Comments

SteffenDE picture SteffenDE  路  3Comments

Antway picture Antway  路  3Comments

paladin2005 picture paladin2005  路  3Comments

sebastianmacias picture sebastianmacias  路  3Comments