mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-18 05:52:51 +00:00
fix(console): display minimum length in password complexity message (#12419)
# Which Problems Are Solved
During user registration and password changes, the console's password
complexity hint displayed the raw `{{value}}` placeholder instead of the
configured minimum length — e.g. `Must be at least {{value}} characters
long (0/8)`. The bug is language-independent (confirmed in English and
Dutch).
# How the Problems Are Solved
The `password-complexity-view` template passed `policy.minLength` — a
proto `uint64` that deserializes to a JavaScript `bigint` — to the
ngx-translate pipe. ngx-translate v17's `formatValue` returns
`undefined` for a `bigint`, so the `{{value}}` token was never
substituted. The template now passes the component's existing
`minLength` getter (`Number(policy.minLength)`), so the value
interpolates correctly.
# Additional Changes
None
# Additional Context
- Closes #12390
- Reported on ZITADEL Cloud v4.15.3
---------
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Ramon <[email protected]>
Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
co-authored by
Cursor
Ramon
Livio Spring
parent
56f4798ed3
commit
53d7920349
+2
-2
@@ -23,8 +23,8 @@
|
||||
}
|
||||
}
|
||||
<span class="cnsl-secondary-text"
|
||||
>{{ 'USER.PASSWORD.MINLENGTHERROR' | translate: { value: policy.minLength } }} ({{ password?.value?.length }}/{{
|
||||
policy.minLength
|
||||
>{{ 'USER.PASSWORD.MINLENGTHERROR' | translate: { value: minLength } }} ({{ password?.value?.length }}/{{
|
||||
minLength
|
||||
}})
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -1040,7 +1040,7 @@
|
||||
"SET": "Imposta nuova password",
|
||||
"RESENDNOTIFICATION": "Invia email per la reimpostazione",
|
||||
"REQUIRED": "Mancano alcuni campi obbligatori.",
|
||||
"MINLENGTHERROR": "Deve essere lunga almeno {{valore}} caratteri.",
|
||||
"MINLENGTHERROR": "Deve essere lunga almeno {{value}} caratteri.",
|
||||
"MAXLENGTHERROR": "Deve contenere meno di {{value}} caratteri"
|
||||
},
|
||||
"ID": "ID utente",
|
||||
|
||||
Reference in New Issue
Block a user