Send the password-too-weak code with the weak password error

The frontend already translates that code, so the user no longer sees the untranslated server message.
This commit is contained in:
Quentin Gliech authored and GitHub committed 2026-10-16 11:17:12 +02:00
1 parent 5a649f0424
commit fda8a00a50
1 file changed
+1 -2
@@ -144,11 +144,10 @@ pub(super) async fn register(
}
if !password_manager.is_password_complex_enough(&form.password)? {
// TODO localise this error
state.add_error_on_field(
RegisterFormField::Password,
FieldError::Policy {
code: None,
code: Some("password-too-weak"),
message: "Password is too weak".to_owned(),
},
);