db-ui / mono

DB UX Design System Monorepo - Provides Design Tokens and components for Web UIs
https://db-ui.github.io/mono/
Apache License 2.0
66 stars 7 forks source link

form elements: questioning mandatory `validMessage` for `valid` ones #2507

Open mfranzke opened 7 months ago

mfranzke commented 7 months ago

I'm questioning why we would enforce the definition of an validMessage property (by showing a "TODO" message if validMessage hasn't been provided); it's pretty clear to me that one would need an invalidMessage, for which we provide a great fallback by the browsers built-in .validationMessage property, but the valid case shouldn't need a message from my point of view.

nmerget commented 6 months ago

It's a UX requirement:

We shouldn't provide only a green border or a green icon without any text, because it can be overseen pretty easily. For more information ask our UX colleagues.

mfranzke commented 6 months ago

It's a UX requirement:

We shouldn't provide only a green border or a green icon without any text, because it can be overseen pretty easily. For more information ask our UX colleagues.

https://marketingportal.extranet.deutschebahn.com/marketingportal/Design-Anwendungen/db-ux-design-system/version-3/components/data-input/input#:~:text=ausgef%C3%BCllt%20werden%20muss.-,Validation,-Bei%20einem%20Inputfeld shows a colored helper message, for which it would be strange to include both error and success messages with the exact same content, especially as they aren't even including an error or success describing parts. So it's my understanding, that both error and success message would be optional and only get displayed as a replacement for the regular helper message, which is optional itself (if none is provided, only the other color coding and related icon would get displayed based on the state).