Learn More





Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Trying to edit the dnn default registration module for User NameTrying to edit the dnn default registration module for User Name
New Post
1/30/2014 1:36 AM
I have tried to find out how to edit the User Name field by going into admin>languages, admin>site settings>Users> profile fields and by clicking on the module and then selecting development but can not find out how to do it. I would like to do what I have listed below:

1. Change the help text from "Enter a username. It must be at least five characters long alphanumeric value" to something like "user names are your house numerical and street name with no spaces Example: if you live at 123 South Street your user name should be 123South"

2. I would like the default vale for the fallible filed to look something like this: User Name: [ Example: 123South ]

3. I would like to set up the User Name Validation to make it that if someone enters a username that is not three digits followed by text (no spaces) that it rejects it... Don't know where to start on this....

Any help, opinions or points in the right direction would be arrpicated!
New Post
1/30/2014 7:29 PM

You could change the user name regex validation to validate the structure.

Admin->SiteSettings->User Account Settings:

and change the 'User Name Validation' regex to match your requirements.  Something like:


would do what you have asked

HOWEVER - i would suggest that you need to think this thru - what happens for a person that lives at 1304 Ann Street  for example or worse still UNIT 1, 99999 Abe Road  -  this regex would keep rejecting till they enter 123abcde -  there are ways to make the regex do most things - but first you would need to work out exactly what things that will be.


You would then also need to edit the language resource Admin -> Security -> SharedResources.resx  -  Username.RegExError  to show your error message -  and Username.Help to show your tool tip.


New Post
1/30/2014 11:54 PM
Thank you Wes Tatters for the reply. The site I am working on is for only people within our home owners association ( easy way to explain it). The numerals throughout the area are only three digits. I would really like to let them use what ever they would like as a username, but this is how the board for the association would like it. So lets just say that the highest house numerical is 999 and the longest street name is Lakeshore if they were to enter 999Lakeshore would that code that you provided me with (thanks again) work? I have already edited the text if they enter it wrong with an explanation of how the format should be. I also edited the text on the registration page to advise them of how it should be.
Also, I would like to learn how to write the statement you provided, how can I go about doing that? Could you give me a bread down? Thanks so much for the help, you don't know how much I appreciate it!
New Post
1/31/2014 12:17 AM
So I sort of understand the code you provided ^[0-9]{3}[A-Za-z]{5}$ . I see by changing the {5} to a difffrent value (lets say {6}) changes the number of charicters that the username would be allowed to enter (ex: ^[0-9]{3}[A-Za-z]{6}$ would be 123abcdef). How wold I change that to a variable so that the street part of the name could be between 3 and 9? What language are you/we using here?
With breaking down the code here is what I understand
^= I dont know yet
[0-9]= numbers 0 through 9
{3}= the amount of numbers allowed
[A-Za-z]= the letters allowed
{5}= the amount of letters allowed
$= I dont know yet
New Post
1/31/2014 5:09 PM

The language is a special format called a Regular Expression or RegEx - it was a designed as a common language for searching / replacing and validating strings of text.   There are a number of different variants of the language - when used as a parameter in dnn - we are using the C# RegEx expression format.

^[0-9]{3}[A-Za-z]{3,9}$   would tell the system to require 3 numbers followed by 3 to 9 characters 

^ is a bounding marker - it says match the start of the string

% is a bounding marker as well - it says match the end of the string

Have a look at the microsoft page - 
it has a lot of info on regex for and hence dnn.

And the code project at has a pretty good general overview.

ALSO You can find a lot of information about regex formats for common tasks at the reg library  - 


HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Trying to edit the dnn default registration module for User NameTrying to edit the dnn default registration module for User Name

These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
Try Evoq
For Free
Start Free Trial
a Demo
See Evoq Live
Need More Information?