How do I validate a password field on 'create' and 'change' only.
And skip validation if it's empty on the update page meaning that the user doesn't want to change it?
Here's part of the form
<%= semantic_form_for [:admin, @account] do |f| %>
<%= f.semantic_errors %>
<%= f.inputs do %>
<%= f.input :email %>
<%= f.input :password %>
<%= f.input :password_confirmation, :label => 'Confirm Password' %>
I've tried the answer here
How do I exclude password fields from validation during record update? (Rails 3.0.4, Ruby 1.9.2)
but it still checks when the password field is empty on update.