CommunityToolkit / CommunityToolkit/dotnet
Usage of ObservableValidator in Windows Template Studio
- Dominant language
- C#
- Stars
- 3.8k
- Forks
- 400
- PR merge metrics
- No merged PRs in 30d
Description
Hi
We are working on a Mockup for WinUI3 Templates in Windows Template Studio that uses the MVVMToolkit libraries.
You can find the code at [Mockup-WinUI3](https://github.com/microsoft/WindowsTemplateStudio/tree/Mockup-WinUI3).
As part of this mockup we're looking at a FormPage that allows users to add a new order to an in-memory SampleOrder Collection.
We want to validate the user input and give visual feedback when the user edits any of the fields and when clicking submit.
We initially implemented a custom ValidationObservableRecipient and want to switch to the MVVMToolkit ObservableValidator now.
You can find a sample implementation of the old page in FormPage and the new implementation in the FormWCTPage.
We are having some issues in the new FormWCTPage:
- The OrderId does not always remove the error message when a correct value is entered.
- We did not find a way to validate and show visual feedback on the fields to the user when clicking submit button (for example: leave all fields empty and click submit)
- We did not find a way to reset the fields to the default values after submitting
Are we missing something or are those scenarios not yet supported?
**Screenshots of Form Page**

Clicking directly on submit button

Thank you so much ;)
Contributor guide
Assessment
This issue has not been assessed yet.