I cannot get things working with client_side_validations and devise. I am using a simple form with email, password and password confirm.
If I tab out of any field, I don't get errors. I only see the server side errors after I submit.
I am using Rails 3.2.1, have followed the steps on the gems github, I am not using formtastic or simple_form. I've un-commented the code from client_side_validations.rb
I've tried the suggestion found here,
Rails 3: client_side_validations gem and devise password validations
Made changes to app/views/devise/registrations/new/html.erb and it is not working for me.
<h2>Register</h2>
<div class="register_form">
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :validate => true) do |f| %>
<%= devise_error_messages! %>
<div><%= f.label :email %><br />
<%= f.email_field :email, :validate => true %></div>
<div><%= f.label :password %><br />
<%= f.password_field :password, :validate => true %></div>
<div><%= f.label :password_confirmation %><br />
<%= f.password_field :password_confirmation, :validate => true %></div>
<div><%= f.submit "Sign up" %></div>
<p>
<%= render 'links' %>
</p>
<% end %>
</div>
Moreover I am seeing an error with the password field the odd time. If I type less then 6 letters, tab out, I get an error saying I need to enter at least 6 letters, and one have to be a number? After the error, whatever was typed in the password filed get deleted, if I try to type something the password field keeps getting blanked out!