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.74k stars 213 forks source link

how to mask my email input by using vue-the-mask as directive #103

Open ecuci opened 5 years ago

ecuci commented 5 years ago

I'm using vue-the-mask as directive in order to mask my form inputs for phone numbers and id numbers. I would like to mask my email input field as xxxxx@xxxxx x accepting any kind of possible characters, my aim is to put @ so the users wont miss it out. Could you please help me out ?

ferulisses commented 5 years ago

I need this mask too, a mask for e-mail should accept various characters before @ (ASC, numbers and some punctuation), some ASC and numbers after @, at least one point (.) and ASC only for the TLD, but also can have subdomains.

As example, I use the following regex as a validation mask: ^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$

felipebraga commented 5 years ago

I suggest you to use a validator, but not a mask on this case.