Announcement

Collapse
No announcement yet.

Disable special characters in usernames

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Disable special characters in usernames

    Hello, i know that for disable special characters in username i should use a Regular Expression.

    I need a Regular Expression that allow all characters of an english/european keyboard (for example A-Z 0-9 and|!"£$%&/()[]{}~=?^'ìè+ùàò,.-é*§°ç;:[email protected]#<>€ and spaces too) but not special characters like that αßу ♥, etc.

    What Regular Expression should i use to do that?
    Thanks in advance

  • #2
    Setup a regex:

    Admin CP -> vBulletin Options -> User Registration Options -> Username Regular Expression

    Try this (limits usernames to alpha characters, numbers, and spaces):

    ^[A-Za-z0-9 ]+$

    Or this (takes out unicode entities):

    ^((?!&#\d+;)[\x20-\x7E])+$

    This is not retroactive to existing usernames.

    Comment


    • #3
      i want to use these chachters (^[A-Za-z0-9 ]+$) and also these characters (ç ş ö ü ğ ı) what can i do ?

      Comment


      • #4
        Originally posted by Jake Bunce View Post
        Setup a regex:

        Admin CP -> vBulletin Options -> User Registration Options -> Username Regular Expression

        Try this (limits usernames to alpha characters, numbers, and spaces):
        Is there an easy way to not allow spaces in the username? Thanks

        Comment


        • #5
          Originally posted by tsptom View Post
          Is there an easy way to not allow spaces in the username? Thanks
          Just delete the space after number 9 in this example: ^[A-Za-z0-9 ]+$

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X