Closed PisaJan closed 8 years ago
Is this language specific? I don't think those are valid characters in English at least, just googling a few of them they all mention they are language specific. If you could clarify the languages that have issue or PR the proper languages it would be appreciated.
Yeah, you're right, it's language specific. I guess here is good overview about languages with diacritics: https://en.wikipedia.org/wiki/Diacritic#Languages_with_letters_containing_diacritics In my case it's czech language. If there is some more info needed, I will be happy to help.
Since ES5 javascript doesn't provide a function to check a char is unicode letter (at least trough RegEx) it seems that xregexps might be a useful solution.
BTW: It's IMHO good idea to have all validators use unicode classes.
Perhaps this could be used, with 2 or 3 sensible defaults: for English-only and for commonly used alphabets. Perhaps a blacklisting style could make more sense as an alternative - e.g. aside for containsOnlyAlpha()
we'd have containsNoSpecialCharacters()
that could rule out everything that's not a letter in some language.
Thanks for submitting this / commenting on this. At this time we are closing this because we have completely re-written and are deprecating the previous feature set. If you feel this should be re-opened please feel free to review this blog post and submit either again on this repository, or on the new validatejs bridge repository
Thanks again!
I would expect that diacritics would be also considered as alpha or this validatioun would be divided into 2 cases - one with and one without diacritics.