Vee-validate: cannot validate cyrillic

Created on 3 Feb 2017  路  3Comments  路  Source: logaretm/vee-validate

Versions:

VueJs: 2.1.3
Vee-Validate:2.0.0-beta.22

Description:

alpha rule cannot validate cyrillic - when I enter russian letters it is always error state

馃悰 bug

Most helpful comment

Added support in 400bd62 by default the alpha validators will try all locales if at least one passes then the field is considered valid, unless specified a specific locale as a parameter then that locale will be the only one checked.

eg:

<input name="name" v-validate="'alpha:ru'">

I based it on alpha.js from validator.js.

Community contributions maybe required for locales that have different character sets than the ones implemented.

All 3 comments

You are correct, I don't think JavaScript has a reliable regex to achieve this, I will probably use Validator.js alpha method.

In the mean time you can create your own Cyrillic/Alpha validator and use it instead of alpha rules.

Added support in 400bd62 by default the alpha validators will try all locales if at least one passes then the field is considered valid, unless specified a specific locale as a parameter then that locale will be the only one checked.

eg:

<input name="name" v-validate="'alpha:ru'">

I based it on alpha.js from validator.js.

Community contributions maybe required for locales that have different character sets than the ones implemented.

Hello @logaretm ,

I have a question regarding validating Romanian special characters. I need to be able to validate all the current special characters from Cyrillic, German, French, Spanish etc. But also support Romanian. How would I go about doing that? I'm using version 2.2.8

I still want to use the alpha rules as they are, just add support for a few characters, specifically these: 膬 芒 卯 葯 葲.

Thanks so much for all the hard work :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Hoagiex picture Hoagiex  路  3Comments

YamenSharaf picture YamenSharaf  路  3Comments

the94air picture the94air  路  3Comments

triffer picture triffer  路  3Comments

jagasan picture jagasan  路  3Comments