Empty error message when validation issue due the PersonNameProhibitedValidator validation #26750
Closed
1 task done
Labels
Milestone
Before reporting an issue
Area
user-profile
Describe the bug
Edit some attribute in admin console in user-profile and go to section
Validations
Try to add validator
person-name-prohibited-characters
There is configuration option
Error message key
, which has this tooltipKey of the error message in i18n bundle. Dafault message key is error-person-name-invalid-character
. This implies to me that I can just leave this empty to have the default name.Issue 1: There is minor typo in the tooltip (Dafault)
I save the validator. In the JSON, it is saved with empty
error-message
option.my-attribute
with incorrect value likeJo&hn
. There is only error messagemy-attribute
without any further explanation of what was wrong. Reason is, that default error message was not applied, but instead, it used empty error message. See screenshotNOTE: Same issue happens also for some other validators (like
PatternValidator
orUsernameProhibitedCharactersValidator
)Version
nightly
Expected behavior
Some more appropriate error message like
my attribute has invalid characters
instead of justmy attribute
without any explanation. Basically when "error message" parameter is not null, but blank, it can be still good to fallback to default error message.Actual behavior
Error message
my-attribute
without any explanation (See screenshot)How to Reproduce?
See above
Anything else?
Not sure if this can be improved also in the UI layer and when attempting to save validator with some empty configuration parameter, it is considered that this configuration parameter was not used at all (rather than adding this parameter with empty value). So in my case, it can just save validator without error-message parameter like:
instead of:
This would need to be fixed in UI layer though...
The text was updated successfully, but these errors were encountered: