translate all error messages

This commit is contained in:
Moritz 2025-10-16 13:54:07 +02:00
parent 908517641b
commit cde619543f
Signed by: moritz
GPG key ID: 1020A035E5DD0824
7 changed files with 181 additions and 41 deletions

View file

@ -162,8 +162,10 @@ defmodule Mv.Accounts.User do
# Global validations - applied to all relevant actions
validations do
# Password strength policy: minimum 8 characters for all password-related actions
validate string_length(:password, min: 8) do
where action_is([:register_with_password, :admin_set_password])
validate string_length(:password, min: 8),
where: [action_is([:register_with_password, :admin_set_password])],
message: "must have length of at least 8"
end
# Prevent overwriting existing member relationship