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:
Liam Neville
2026-07-17 08:37:41 +02:00
committed by GitHub
co-authored by Cursor Ramon Livio Spring
parent 56f4798ed3
commit 53d7920349
2 changed files with 3 additions and 3 deletions
@@ -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>
+1 -1
View File
@@ -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",