User Role Editor
Space not allowed in role name (2 posts)

  1. gmangesh
    Posted 3 years ago #


    I get the following popup error when I try to add a role with a space in the role names.

    "Role Name must contain latin characters and digits only"

    WordPress allows spaces in names - so URE should also allow spaces in names.

    To allow spaces, I added a space in the regular expression used in line 104 of includes/ure-role-edit.php:

    if (!(/^[\w- ]*$/.test(value)))

    Similar checks are also performed in includes/ure-lib.php


  2. Vladimir Garagulya
    Plugin Author

    Posted 3 years ago #


    thanks for your suggestion. I excluded spaces from role name purposefully. Yes, WordPress allows spaces in role names. But does it uses them really? May be it just doesn't make needed checking.

    At earlier versions I excluded the '-' (hyphen) too and roles names could be valid programming language identifier only. Hyphens are allowed now. But I still do not wish allow spaces :) with my tool.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • User Role Editor
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.