<p>The error "Display Name is invalid" while registering might not be too helpful. Instead, display which characters are not allowed (I'm not completely sure about the handling of <code>\/</code>):</p>
<div class="highlight"><pre><span class="gh">diff --git a/app/models/user.rb b/app/models/user.rb</span>
<span class="gh">index 3b43130..27662f1 100644</span>
<span class="gd">--- a/app/models/user.rb</span>
<span class="gi">+++ b/app/models/user.rb</span>
<span class="gu">@@ -36,7 +36,7 @@ class User < ActiveRecord::Base</span>
validates_length_of :display_name, :within => 3..255, :allow_nil => true
validates_email_format_of :email, :if => Proc.new { |u| u.email_changed? }
validates_email_format_of :new_email, :allow_blank => true, :if => Proc.new { |u| u.new_email_changed? }
<span class="gd">- validates_format_of :display_name, :with => /^[^\/;.,?%#]*$/, :if => Proc.new { |u| u.display_name_changed? }</span>
<span class="gi">+ validates_format_of :display_name, :with => /^[^\/;.,?%#]*$/, :message => "contains invalid characters (\/;.,?%#)" :if => Proc.new { |u| u.display_name_changed? }</span>
validates_format_of :display_name, :with => /^\S/, :message => "has leading whitespace", :if => Proc.new { |u| u.display_name_changed? }
validates_format_of :display_name, :with => /\S$/, :message => "has trailing whitespace", :if => Proc.new { |u| u.display_name_changed? }
validates_numericality_of :home_lat, :allow_nil => true
</pre></div>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">
—<br>
Reply to this email directly or <a href='https://github.com/openstreetmap/openstreetmap-website/issues/157'>view it on GitHub</a>.
</p>
<img src='https://github.com/notifications/beacon/uTRSc6ihLa7Shf84BpiOpmLWAu4oQih75mggZl1E8_na2hzDxv4hQsuwtWuM_Mh4.gif' height='1' width='1'>