Add a reply
View Replies (
3
)
Resolved
Custom field validation by RegEx in Russian language not works for text field
bec00l
Support
Friday, July 18 2014, 04:44 AM
I try to set up validation of field be regular expression [a-zA-Zа-яА-Я0-9\-\ ]{3,100}
it works fine with english, but not works with russian.
it's not valid with any russian word
site is in UTF-8
Responses (
3
)
Likes
Latest
Oldest
admin
Accepted Answer
Admin
Hi,
we use PHP preg_match for regular expression, so to validate Cyrillic char you can use
\p{Cyrillic}
I think the correct way is:
[a-zA-Z0-9\p{Cyrillic}\-\ ]{3,100}
Sorry but I have not tested this
References
http://itworkarounds.blogspot.it/2011/08/validating-cyrillic-utf8-alphanumeric.html
more than a month ago
Support
# 1
bec00l
Accepted Answer
Content Protected
more than a month ago
Support
# 2
admin
Accepted Answer
Admin
try with this: [a-zA-Z\p{Cyrillic}0-9\-\ ]{3,100}
I apologize if I'm going to attempt but unfortunately I do not have much experience with regular expressions.
more than a month ago
Support
# 3
Page :
1
There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.