Body: <p>I have an instance of a front-end password update form running on one of my Craft Pro 2.3.2635 sites, and it works correctly. If I submit the form with the correct current password and valid new password, it updates the user, and if there is a problem, it displays an error message.</p>
  
  <p>However, when I use the same code on a new build, if I leave both the current and existing password fields blanks it fails to correctly validate redirects to the page specified in my redirect input field, and the on user save event is fired. The same form on my other build appears to fail validation with the message 'Password  cannot be blank'.</p>
  
  <p>All other erroring including the password length, and incorrect current password checks seem to run fine. Why might the 'Password cannot be blank' not be working on my new site?</p>
  
  <p>I've included my form template below:</p>
  
  <pre><code>{% macro errorList(errors) %}
      {% if errors %}
          {% for error in errors %}
              &lt;li class="agents-login__error"&gt;{{ error }}&lt;/li&gt;
          {% endfor %}
      {% endif %}
  {% endmacro %}
  {% from _self import errorList %}
  
  {% extends "_layout" %}
  
  {% block content %}
  
  {% if not user %}
      {% redirect "/login" %}
  {% else %}
  
      &lt;div class="agents-login"&gt;
          &lt;div class="agents-login__form-holder"&gt;
              &lt;a href="/"&gt;
                  &lt;img src="/assets/images/logo.svg" class="agents-login__logo" width="158" height="107" /&gt;
              &lt;/a&gt;
              &lt;p class="message"&gt;Enter your existing password, then choose a new one and click save.&lt;/p&gt;
  
              &lt;form class="agents-login__form  [ form  form--agents ]" method="post" action="" accept-charset="UTF-8" enctype="multipart/form-data"&gt;
                  {{ getCsrfInput() }}
  
                  &lt;input type="hidden" name="action" value="users/saveUser"&gt;
                  &lt;input type="hidden" name="redirect" value="/agents"&gt;
                  &lt;input type="hidden" name="userId" value="{{ user.id }}"&gt;
  
                  {% if account is defined %}
                      &lt;ul class="agents-login__errors"&gt;
                          {{ errorList(account.getErrors('currentPassword')) }}
                          {{ errorList(account.getErrors('newPassword')) }}
                      &lt;/ul&gt;
                  {% endif %}
  
                  &lt;div class="[ form__row  form__row--agents ]  layout"&gt;
                      &lt;div class="[ form__cell  form__cell--agents ]  layout__item"&gt;
                          &lt;label class="form__label" for="password" class="form__label"&gt;Existing Password&lt;/label&gt;
                          &lt;input class="form__control" id="currentPassword" type="password" name="password"&gt;
                      &lt;/div&gt;&lt;div class="[ form__cell  form__cell--agents ]  layout__item"&gt;
                          &lt;label class="form__label" for="newPassword"&gt;New Password&lt;/label&gt;
                          &lt;input class="form__control" id="newPassword" type="password" name="newPassword"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="[ form__row  form__row--agents ]  layout"&gt;
                      &lt;div class="[ form__cell  form__cell--agents ]  layout__item"&gt;
                          &lt;input type="submit" value="Save" class="[ btn  btn--full ]" /&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  
                  &lt;div class="agents-login__back-to-downloads"&gt;&lt;a href="/agents"&gt;Back to downloads&lt;/a&gt;&lt;/div&gt;
              &lt;/form&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  {% endif %}
  
  {% endblock %}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-02-26T22:35:50.470Z
Comments.Text: Are they both running the same version/build of Craft?  Are they using the same settings under Settings->Users?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-02T17:42:17.843Z
Comments.Text: Yes, they're both running 2.3.2635, and have both got both checkboxes in User > Settings unchecked.
Comments.UserDisplayName: Alex H
Tags: <password>
Title: What could be causing the 'Password cannot be blank' validation check not to run on user update?
ThreadText: # What could be causing the 'Password cannot be blank' validation check not to run on user update?
  
  (Asked by: username_0 on 2015-02-26)
  
  I have an instance of a front-end password update form running on one of my Craft Pro 2.3.2635 sites, and it works correctly. If I submit the form with the correct current password and valid new password, it updates the user, and if there is a problem, it displays an error message.
  
  However, when I use the same code on a new build, if I leave both the current and existing password fields blanks it fails to correctly validate redirects to the page specified in my redirect input field, and the on user save event is fired. The same form on my other build appears to fail validation with the message 'Password cannot be blank'.
  
  All other erroring including the password length, and incorrect current password checks seem to run fine. Why might the 'Password cannot be blank' not be working on my new site?
  
  I've included my form template below:
  
  ```
  {% macro errorList(errors) %}
      {% if errors %}
          {% for error in errors %}
              <li class="agents-login__error">{{ error }}</li>
          {% endfor %}
      {% endif %}
  {% endmacro %}
  {% from _self import errorList %}
  
  {% extends "_layout" %}
  
  {% block content %}
  
  {% if not user %}
      {% redirect "/login" %}
  {% else %}
  
      <div class="agents-login">
          <div class="agents-login__form-holder">
              <a href="/">
                  <img src="/assets/images/logo.svg" class="agents-login__logo" width="158" height="107" />
              </a>
              <p class="message">Enter your existing password, then choose a new one and click save.</p>
  
              <form class="agents-login__form  [ form  form--agents ]" method="post" action="" accept-charset="UTF-8" enctype="multipart/form-data">
                  {{ getCsrfInput() }}
  
                  <input type="hidden" name="action" value="users/saveUser">
                  <input type="hidden" name="redirect" value="/agents">
                  <input type="hidden" name="userId" value="{{ user.id }}">
  
                  {% if account is defined %}
                      <ul class="agents-login__errors">
                          {{ errorList(account.getErrors('currentPassword')) }}
                          {{ errorList(account.getErrors('newPassword')) }}
                      </ul>
                  {% endif %}
  
                  <div class="[ form__row  form__row--agents ]  layout">
                      <div class="[ form__cell  form__cell--agents ]  layout__item">
                          <label class="form__label" for="password" class="form__label">Existing Password</label>
                          <input class="form__control" id="currentPassword" type="password" name="password">
                      </div><div class="[ form__cell  form__cell--agents ]  layout__item">
                          <label class="form__label" for="newPassword">New Password</label>
                          <input class="form__control" id="newPassword" type="password" name="newPassword">
                      </div>
                  </div>
                  <div class="[ form__row  form__row--agents ]  layout">
                      <div class="[ form__cell  form__cell--agents ]  layout__item">
                          <input type="submit" value="Save" class="[ btn  btn--full ]" />
                      </div>
                  </div>
  
                  <div class="agents-login__back-to-downloads"><a href="/agents">Back to downloads</a></div>
              </form>
          </div>
      </div>
  {% endif %}
  
  {% endblock %}
  
  ```
  
  **Tags:** password
  
  > **Comments:**
  > **username_1**: Are they both running the same version/build of Craft?  Are they using the same settings under Settings->Users?  
  > **username_0**: Yes, they're both running 2.3.2635, and have both got both checkboxes in User > Settings unchecked.  
  
  ---
  
  ## 0 answers
  
  