MudFormComponent: Clear converter errors on ResetValidation#11971
MudFormComponent: Clear converter errors on ResetValidation#11971ScarletKuro merged 4 commits intoMudBlazor:devfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request addresses an issue where converter errors were not being cleared by the ResetValidation method in MudFormComponent. The change correctly adds logic to reset the _converter.GetError and _converter.GetErrorMessage properties, ensuring that the component's error state is fully reset. This fixes the bug where HasErrors would remain true after a reset. The implementation is clean, correct, and effectively resolves the issue.
|
Does this fix #11958? |
There was a problem hiding this comment.
Pull Request Overview
Fix ResetValidation so it also clears converter-level errors, ensuring HasErrors reflects the cleared state.
- Reset _converter.GetError to false within ResetValidation.
- Reset _converter.GetErrorMessage to null/default within ResetValidation.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ResetValidationmethod ofMudFormComponentresets theError,ErrorTextandValidationErrors, but does not clearConvertervalidation errors. However,HasErrorsfield checks the conversion errors and therefore its value stays true even after reset.Conversion errors are now reset as well.
Fixes #11958
Checklist:
dev).