validate password in the frontend too (#2017)

This commit is contained in:
Athou
2026-01-15 09:44:57 +01:00
parent eb573fdc8b
commit 5a95b95801
36 changed files with 223 additions and 125 deletions

View File

@@ -23,6 +23,13 @@ export function RegistrationPage() {
password: "",
email: "",
},
validate: {
password: value =>
serverInfos && value.length < serverInfos.minimumPasswordLength
? _(msg`Password must be at least ${serverInfos.minimumPasswordLength} characters`)
: null,
},
validateInputOnChange: true,
})
const login = useAsyncCallback(client.user.login, {