mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-06 02:48:50 +00:00
feat: translate error messages (#254)
* feat: translate error messages in error interceptor * fix: add statik import * feat: user error msgs * feat: add translations * feat: add translations * feat: add translations * feat: add translations * feat: add translations * feat: add translations * some fixes and improved error messages Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
@@ -12,7 +12,3 @@ type PasswordAgePolicy struct {
|
||||
MaxAgeDays uint64
|
||||
ExpireWarnDays uint64
|
||||
}
|
||||
|
||||
func (p *PasswordAgePolicy) IsValid() bool {
|
||||
return p.Description != ""
|
||||
}
|
||||
|
||||
@@ -25,10 +25,6 @@ type PasswordComplexityPolicy struct {
|
||||
HasSymbol bool
|
||||
}
|
||||
|
||||
func (p *PasswordComplexityPolicy) IsValid() bool {
|
||||
return p.Description != ""
|
||||
}
|
||||
|
||||
func (p *PasswordComplexityPolicy) Check(password string) error {
|
||||
if p.MinLength != 0 && uint64(len(password)) < p.MinLength {
|
||||
return caos_errs.ThrowInvalidArgument(nil, "MODEL-HuJf6", "Errors.User.PasswordComplexityPolicy.MinLength")
|
||||
|
||||
@@ -10,7 +10,3 @@ type PasswordLockoutPolicy struct {
|
||||
MaxAttempts uint64
|
||||
ShowLockOutFailures bool
|
||||
}
|
||||
|
||||
func (p *PasswordLockoutPolicy) IsValid() bool {
|
||||
return p.Description != ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user