- if (0 != strcmp($newpassword, $confirm)) {
- $this->showForm(_('Passwords don\'t match.'));
+ // Some validation
+
+ if (strlen($newpassword) < 6) {
+ // TRANS: Form validation error on page where to change password.
+ $this->showForm(_('Password must be 6 or more characters.'));
+ return;
+ } else if (0 != strcmp($newpassword, $confirm)) {
+ // TRANS: Form validation error on password change when password confirmation does not match.
+ $this->showForm(_('Passwords do not match.'));