translate all error messages
This commit is contained in:
parent
908517641b
commit
cde619543f
7 changed files with 181 additions and 41 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue