User profile validation pattern error-message not rendered from messages_en.properties #29098
Open
1 of 2 tasks
Labels
area/admin/ui
help wanted
kind/bug
Categorizes a PR related to a bug
priority/normal
status/auto-bump
status/auto-expire
team/ui
Before reporting an issue
Area
admin/ui
Describe the bug
I use translation placeholder to configure messages for the user profile attributes. This worked as expected.
The translations located in the propertie file of the admin theme.
But the error-message for the pattern validator will not be rendered. Other placeholder translations like annotations work fine in the same properties file, e.g.
profile.attribute.myAttribute.placeholder
andprofile.attribute.myAttribute.description
.I tested it with "Add User" in the Admin UI keycloak.v2 theme.
Part of json config of the user profile:
{ "name": "myAttribute", "displayName": "${profile.attribute.myAttribute}", "validations": { "pattern": { "pattern": "^(admin|abc[0-9]{9,9})$", "error-message": "${profile.attribute.myAttribute.validator.errorMessage}" } }, "annotations": { "inputTypePlaceholder": "${profile.attribute.myAttribute.placeholder}", "inputHelperTextBefore": "${profile.attribute.myAttribute.description}" }, "required": { "roles": [ "admin", "user" ] }
Content in: admin/messages/messages_en.properties
profile.attribute.myAttribute.validator.errorMessage=My error message
Version
nightly Docker build
Regression
Expected behavior
Validator message should be rendered like other placeholders.
Actual behavior
see description on top
How to Reproduce?
Anything else?
No response
The text was updated successfully, but these errors were encountered: