-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Element template ~ Field length error message #4207
Comments
@vikkee57 Thanks for this bug report. As I understand you, you want to feature characters as a word to make the error more precise? Or what else do you think is missing / to be improved? |
Thanks for taking a look @nikku. Yes, it's just grammatical. The current message "Must have max length 10" indicates that it should be exactly 10 characters. This is misleading because it the expectation is that it will accept 0-10 characters. A more accurate message then would be something like, "Cannot exceed 10 characters". |
Thanks both of you. Added to |
Describe the bug
It's not quite a bug but feature that has room for improvement. When using element templates, the error messages associated with the field length properties are inaccurate. Can we rephrase them to be more precise?
Current error for max length:
Suggested: Field cannot exceed 10 characters
Current error for min length:
Suggested: Field must be atleast 2 characters
Steps to reproduce
The element template has the following config for this example:
"constraints": { "notEmpty": true, "minLength": 2, "maxLength": 10, . .
Expected behavior
Error messages reflect appropriate system behavior.
eg: Field cannot exceed 10 characters instead of Must have max length 10
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: