Replies: 4 comments
-
1 per field ideally. Even though date input has 3 inputs, I'd lean towards combining multiple errors into a single message such as:
|
Beta Was this translation helpful? Give feedback.
-
I've just moved your query into the Q+A category as it seems like more of a question than a request to modify Canopy, hope that was the intention! |
Beta Was this translation helpful? Give feedback.
-
I think there are two parts to this:
I think our Canopy guide around displaying validation errors, should recommend only displaying a single, validation error (for an input / component) at a time. I think anything more than that breaks the 'succinct' principal, plus you'll probably find that solving one validation error solves multiple ( For how many validation errors should a custom, Canopy component 'emit', i.e. in the |
Beta Was this translation helpful? Give feedback.
-
From a UX perceptive I agree with @alexcanning, if one error can cover things for the user, then let's just show that. For example as @markblandford mentioned, you wouldn't need to show One thing to note, with the Date of Birth component, is that it emits it's own errors for it's internal inputs (e.g. missing day, invalid date) and then the Form that it sits in also can emit a If the consensus is to only show one error message where possible, then we need to update the template logic to handle the various errors coming from within the Date of Birth component and also form the form itself, with more conditions. This could get a little messy in the code - so I think we'd also need to include some guidelines in Storybook for how you handle it to ensure consistency. |
Beta Was this translation helpful? Give feedback.
-
Hi!
Upon fixing a bug in the date-field component it was revealed that at one time multiple errors can occur.
Should we just display 1 error at the time OR should we display multiple errors one underneath each other?
Beta Was this translation helpful? Give feedback.
All reactions