<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Remove Spaces in usernames</title>
		<link>https://legacy.forums.gravityhelp.com/topic/remove-spaces-in-usernames</link>
		<description>Gravity Support Forums Topic: Remove Spaces in usernames</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 19:57:36 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/remove-spaces-in-usernames" rel="self" type="application/rss+xml" />

		<item>
			<title>Carl Hancock on "Remove Spaces in usernames"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/remove-spaces-in-usernames#post-55132</link>
			<pubDate>Thu, 12 Apr 2012 17:06:58 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">55132@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;In the future, please go ahead and post a new thread in the support forum when you have a question or issue rather than replying to an existing thread.  &#60;/p&#62;
&#60;p&#62;The guidelines Chris posted above are the WordPress guidelines for usernames.  &#60;/p&#62;
&#60;p&#62;HOWEVER even though spaces aren't listed in the list of allowed characters that Chris listed above, WordPress DOES in fact allow usernames to contain spaces in them.&#60;/p&#62;
&#60;p&#62;WordPress also allows usernames that are only 1 character in length.&#60;/p&#62;
&#60;p&#62;This is why the Username validation for the User Registration Add-On allows both 1 character usernames and usernames that contain spaces to be used.  WordPress allows it and therefore it isn't triggering any kind of validation issue.&#60;/p&#62;
&#60;p&#62;In this situation WordPress, Gravity Forms and the User Registration Add-On are behaving correctly and as designed.  The usernames that the User Registration Add-On allows already fit and meet WordPress guidelines.&#60;/p&#62;
&#60;p&#62;If you don't like this default behavior, you can certainly customize how it works to suit your needs.  You would need to implement your own custom validation using the gform_validation hook that checks both the length of the input as well as for the presence of spaces in the input and trigger a validation error if necessary.&#60;/p&#62;
&#60;p&#62;You can find a tutorial on how to use the gform_validation hook to implement custom validation here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Using_the_Gravity_Forms_%22gform_validation%22_Hook&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Using_the_Gravity_Forms_%22gform_validation%22_Hook&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;ALSO you mentioned that you are only allowing unique entries, i'm assuming you mean the &#34;No Duplicates&#34; rule is enabled on the field you are using for the Username on your form.  If so, there is no need to enable the &#34;No Duplicates&#34; in this situation.  The User Registration Add-On is going to handle validation of the username field and isn't going to allow duplicates to be used.  Therefore there is no need for you to enable the &#34;No Duplicates&#34; option on that field.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>taradel on "Remove Spaces in usernames"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/remove-spaces-in-usernames#post-55128</link>
			<pubDate>Thu, 12 Apr 2012 16:52:01 +0000</pubDate>
			<dc:creator>taradel</dc:creator>
			<guid isPermaLink="false">55128@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Rob,&#60;/p&#62;
&#60;p&#62;Thanks for the response, however I'm still not quite sure how to write this in. &#60;/p&#62;
&#60;p&#62;Per Chris' response above, it seems like this is supposed to be a built in function of the User Registration add-on.  Am I misinterpreting what he's saying? &#60;/p&#62;
&#60;p&#62;All I really want to accomplish is a username that fits Wordpress's guidelines (A-Z, 0-9, underscores and dashes) and more than 5 characters long.  Is this something that can be easily accomplished?  I am using a field for the username, so I don't need to combine fields or randomize numbers after it (I am only allowing unique entries). &#60;/p&#62;
&#60;p&#62;Thanks again!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Rob Harrell on "Remove Spaces in usernames"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/remove-spaces-in-usernames#post-55096</link>
			<pubDate>Thu, 12 Apr 2012 15:27:00 +0000</pubDate>
			<dc:creator>Rob Harrell</dc:creator>
			<guid isPermaLink="false">55096@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;See if this helps you out:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_username&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_username&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>taradel on "Remove Spaces in usernames"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/remove-spaces-in-usernames#post-55063</link>
			<pubDate>Thu, 12 Apr 2012 12:47:56 +0000</pubDate>
			<dc:creator>taradel</dc:creator>
			<guid isPermaLink="false">55063@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi, I figured I should just post here instead of a new thread.  Anyways, here's my situation:&#60;/p&#62;
&#60;p&#62;I'm using GF plus the user registration add-on to handle user registration for my site.  However, I noticed that I'm able to create usernames with spaces.   I'm also able to register 1 character long usernames.  &#60;/p&#62;
&#60;p&#62;It appears I've got everything mapped and working properly, however I really do not want to let users register with spaces and short usernames.  Any idea on what's going on/how to fix? &#60;/p&#62;
&#60;p&#62;Many thanks!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Remove Spaces in usernames"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/remove-spaces-in-usernames#post-31145</link>
			<pubDate>Thu, 28 Jul 2011 13:18:09 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">31145@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Are you using the User Registration Add-on?  If so, the username there is already validated to be consistent with WordPress guidelines for usernames:&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;The username can only contain alphanumeric characters (A-Z, 0-9), underscores and dashes&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;If you're using another type of field and not using the User Registration Add-on, then you will either need to check for valid names (let the visitor know what they entered is not valid) or just modify their submission to remove the spaces.&#60;/p&#62;
&#60;p&#62;I would suggest not allowing the spaces in the field.  Please post more information about your use so we can help you with the validation.  Thank you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>deafle on "Remove Spaces in usernames"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/remove-spaces-in-usernames#post-31120</link>
			<pubDate>Thu, 28 Jul 2011 09:35:39 +0000</pubDate>
			<dc:creator>deafle</dc:creator>
			<guid isPermaLink="false">31120@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;how can I have it so that when the form submits it removes all spaces in a username or doesn't let spaces be imputed for a username?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
