eufemia
eufemia copied to clipboard
Forms: Combined error messages are inflexible and presented in English
🐛 Bug Report
When rendering a field with multiple validation props, a combined error message is shown. Example:
must NOT have more than 3 characters and must match pattern "^[a-zA-Z]$"
This error message has multiple problems:
- It is in English, unlike other messages
- It doesn't start with a capital letter
- It doesn't end with a period
- It is not customizable (in full or in part)
Here's an example from our application:
To Reproduce
Here is a CodeSandbox demonstrating the issue
Expected behavior
The error message is displayed in Norwegian or English, depending on the set language. As a bonus, It would be nice to be able to customize (showing the pattern isn't great, for instance)
Eufemia Version
Browser JS: 10.51.1
Browser CSS: 10.51.1