-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Multiple validation errors #314
Comments
Hm, I think I remember considering this way back. Not sure why I landed the way I did. Are there any built-in or popular 3rd party controls that actually support showing multiple errors? In any case, I'm not opposed to this. |
Not sure. To repeat for clarity, I was able to display multiple errors without too much trouble. I added a screenshot of that to my previous comment. Also, I meant to say that I left the tooltip as it was, which is still just showing the first error in the list. That can also be seen in the newly added screenshot. |
Showing multiple errors is very useful. E.g. if a password is too long and is missing certain classes of characters, you want to tell both facts simultaneously. |
I created PR #315 to resolve this issue. |
Support for multiple validation errors #314
The
INotifyDataErrorInfo
interface supports multiple errors per property. Elmish.WPF is currently restricting this to a single error (see line 838).Elmish.WPF/src/Elmish.WPF/ViewModel.fs
Lines 830 to 839 in db20825
The branch demo/multiple_validation_errors contains a proof of concept that shows how to show multiple validation errors in WPF. See the screenshot below. The only hack there is the margin I added to the
Submit
button so that it wasn't covered by the additional validation errors.Would anyone like this feature?
I think this feature can be added while remaining backwards compatible, so I think it is fine to exclude this feature from
v4
.The text was updated successfully, but these errors were encountered: