Announcement
Collapse
No announcement yet.
Username Regular Expression and Unicode
Collapse
X
-
Thanks for quick response but it won't work. I've already tried most of combinations and editing the source code was my final solution.
-
Try to use this:
Code:/[A-Za-z\s\x{0600}-\x{06FF}0-9_\.\- ]/u
Leave a comment:
-
Username Regular Expression and Unicode
There is a new feature for limiting usernames in vb 4 (I think it has been added recently) called: Username Regular Expression
I had problem with adding some Persian (UTF-8) characters to this new feature to let users have some non-English usernames.
The regex I used is here:
Code:^[A-Za-z\s\x{0600}-\x{06FF}0-9_\.\- ]+$
changed it from:
PHP Code:if (!preg_match('#' . str_replace('#', '\#', $this->registry->options['usernameregex']) . '#siU', $username))
PHP Code:if (!preg_match('#' . str_replace('#', '\#', $this->registry->options['usernameregex']) . '#siUu', $username))
Please somebody let me know if there is another solution to solve this without touching the vb code or please correct this in future versions.
Regards,
Related Topics
Collapse
-
by sytyregistryWe had a need on our forum to display the latest image from our Instagram account. Not finding much online to help, I combined a few methods from other IG API integrations and came up with something that...
-
Channel: vBulletin 5 Tutorials
Wed 24 May '17, 2:34pm -
Leave a comment: