This is the validation code:

/**
 * Password change form validation.
 */
function password_tab_validate($form, &$form_state) {
  $pass = trim($form_state['values']['pass']);
  if (empty($pass)) {
    form_set_error('pass', t('Your password cannot be empty.'));
  }
}

But how is it possible to submit an empty password when the password fields are required?:

$form['pass'] = array(
  '#type' => 'password_confirm',
  '#size' => 25,
  '#required' => TRUE,
  '#description' => t('To change the current user password, enter the new password in both fields.'),
);

Anyone have any idea? Is the validation code pointless?

Comments

AohRveTPV created an issue. See original summary.

aohrvetpv’s picture

Issue summary: View changes