public void onValidateFromPasswordForm() throws NoSaltException { if (currentPassword != null) validateCurrentPassword(); if (newPassword != null && confirmPassword != null && !newPassword.equals(confirmPassword)) passwordForm.recordError(confirmPasswordField, "Passwords do not match"); }
private void validateCurrentPassword() throws NoSaltException { if (!user.matchPassword(currentPassword)) passwordForm.recordError(currentPasswordField, "Incorrect password"); }