title: Force validation of blank passwords in Authlogic
body: <p>I'm adding a password reset feature to my Rails application that uses Authlogic. I was following the guide here: <a href="http://www.binarylogic.com/2008/11/16/tutorial-reset-passwords-with-authlogic/" rel="noreferrer">http://www.binarylogic.com/2008/11/16/tutorial-reset-passwords-with-authlogic/</a> and everything works as I'd like except for one thing: the password reset form accepts blank passwords and simply doesn't change them.</p>
  
  <p>I've been searching around, and have learned that this is the intended default behavior because it allows you to make user edit forms that only change the user's password if they enter a new one, and ignore it otherwise. But in this case, I specifically want to enforce validation of the password like when a user initially registers. I've found two possible solutions for this problem but haven't been able to figure out how to implement either of them.</p>
  
  <p>1) Someone asked this same question on Google Groups:</p>
  
  <p><a href="http://groups.google.com/group/authlogic/browse_thread/thread/7dfdcb7c7b2fdf25" rel="noreferrer" title="User model saves with blank password">User model saves with blank password</a></p>
  
  <p>Ben's response was to use <code>@user.validate_password = true</code> to force validation of the password. I tried this but I get an undefined method error: <code>undefined method 'validate_password_field=' for #&lt;User&gt;</code>.</p>
  
  <p>2) There seems to be an Authlogic configuration option called <code>ignore_blank_passwords</code>. It is documented here:</p>
  
  <p><a href="http://rdoc.info/rdoc/binarylogic/authlogic/blob/85b2a6b3e9993b18c7fb1e4f7b9c6d01cc8b5d17/Authlogic/ActsAsAuthentic/Password/Config.html#ignore_blank_passwords-instance_method" rel="noreferrer" title="Module: Authlogic::ActsAsAuthentic::Password::Config#ignore_blank_passwords">Module: Authlogic::ActsAsAuthentic::Password::Config#ignore_blank_passwords</a></p>
  
  <p>This looks like it would work, but my understanding is that this is a global configuration option that you use in your initial <code>acts_as_authentic</code> call in the User model, and I don't want to change it application-wide, as I do have a regular edit form for users where I want blank passwords to be ignored by default.</p>
  
  <p>Anyone found a solution to this? I see <code>validate_password=</code> in the change log for Authlogic 1.4.1 and nothing about it having been removed since then. Am I simply using it incorrectly? Is there a way to use <code>ignore_blank_passwords</code> on a per-request basis?</p>