forms
forms copied to clipboard
Improve error message for required fields
Using the required-attribute to generate error messages means that they might at times be misleading. In the example below the user need to choose one of the four checkboxes, but the error message simply says that the user must check the first one to continue. Since only the first object with this attribute gets an error message this can be quite confusing.
Suggestion:
- Design and implement custom error messages. They should tell what the issue is and how to resolve it where possible
- They must be connected to their form objects in the code
- Avoid using the required-attribute