title: Rails 5 & Devise: Minimum password length not working
body: <p>I'm using Rails 5 &amp; Devise and in initializers/devise.rb:</p>
  
  <pre><code>config.password_length = 6..128
  </code></pre>
  
  <p>registrations/new.html.erb:</p>
  
  <pre><code> &lt;%= form_for(resource, as: resource_name, url: user_registration_path, :html =&gt; {:class =&gt; "col s12 form-text", autocomplete: "off"}, validate: true) do |f| %&gt;
  
  
            &lt;%= f.text_field :full_name, :class =&gt; "validate", :placeholder =&gt; "Robin Smith", :required =&gt; true %&gt;
            &lt;%= f.email_field :email, :class =&gt; "validate", :required =&gt; true, placeholder: " " %&gt;
            &lt;%= f.password_field :password, :class =&gt; "validate", :required =&gt; true, placeholder: " " %&gt;
          &lt;%= f.submit :class =&gt; "waves-effect waves-light btn-flat", :value =&gt; "Join Now" %&gt;
      &lt;% end %&gt;
  </code></pre>
  
  <p>And routes:</p>
  
  <pre><code>resources :users
  devise_for :users, path: '', path_names: { sign_up: 'register', sign_in: 'login', sign_out: 'logout'}
  </code></pre>
  
  <p>User.rb:</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    devise :database_authenticatable, :registerable, 
            :recoverable, :rememberable, :trackable,
            :omniauthable
    validates :email, :uniqueness =&gt; true
    validates_format_of :email,:with =&gt; Devise::email_regexp
  </code></pre>
  
  <p>For some reason the user is still able to set a password of 0-5 characters.</p>