Vee-validate: Arabic numerals aren't considered numerals

Created on 2 Aug 2017  Â·  3Comments  Â·  Source: logaretm/vee-validate

Versions:

  • VueJs: #.#.#
  • Vee-Validate:

Description:

when typing arabic numerals '٠١٢٣٤٥٦٧٨٩' in a field that has numerical validation it's not accepted.

I would appreciate it if someone knows a way around this.

✨ enhancement

Most helpful comment

There are multiple ways to handle this:

You can force the validator to validate a computed property that converts the Arabic numerals to English:

https://jsfiddle.net/logaretm/kaaq0n2k/

Or you can create a custom validator that accepts both which is the better approach in my opinion. I might add support in the next version for Arabic numerals.

All 3 comments

There are multiple ways to handle this:

You can force the validator to validate a computed property that converts the Arabic numerals to English:

https://jsfiddle.net/logaretm/kaaq0n2k/

Or you can create a custom validator that accepts both which is the better approach in my opinion. I might add support in the next version for Arabic numerals.

@logaretm
The Arabic 'Ù ' doesn't get converted!
My browser: Chrome on MacOS.

I would appreciate it if someone could help me with that.

Support was added for the numeric rule only if someone is willing to PR for other numeric rules that would be great. I will add them gradually over time.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MaxMilton picture MaxMilton  Â·  3Comments

jagasan picture jagasan  Â·  3Comments

kidox picture kidox  Â·  3Comments

Etheryte picture Etheryte  Â·  3Comments

yyyuuu777 picture yyyuuu777  Â·  3Comments