title: Adding additional field and validation to Devise view/model in Rails app
body: <p>I generated the default <a href="http://github.com/plataformatec/devise" rel="noreferrer">devise</a> views with:</p>
  
  <pre><code>rails generate devise:views
  </code></pre>
  
  <p>Then I added a <code>username</code> field to the <code>views/devise/registrations/new.html.erb</code> form.</p>
  
  <p>Currently, only <code>email</code> and <code>password</code> validation occurs.  How do I validate presence and uniqueness of the <code>username</code> field? Do I need to add something to the <code>User</code> model?</p>