type
PasswordPolicy
Length, byte, bcrypt, and common-password policy for local credentials.
MinLengthint- Minimum Unicode code-point length; zero defaults to 8.
MaxBytesint- Maximum UTF-8 byte length; zero defaults to bcrypt’s safe 72-byte limit.
BcryptCostint- bcrypt work factor; zero uses bcrypt.DefaultCost and values above 16 are rejected.
Validatefunc(password string) error- Adds an application-specific rule and should return a user-safe correction message.
Ridu deliberately uses length-based defaults rather than mandatory character classes. The custom validator runs only in trusted Go code and is never serialized.