Replies: 3 comments 5 replies
-
Update: I have changed the MudForm element to be an EditForm instead, also replaced the FluentValidaton with DataAnnotationsValidator now everything is behaving as expected. |
Beta Was this translation helpful? Give feedback.
-
I'm having the same issue using FluentValidation with MudDatePicker. Just like @glondono I cannot switch to DataAnnotations validation because I need to reuse my forms and validators elsewhere. |
Beta Was this translation helpful? Give feedback.
-
I submitted an issue for this: #3876 Please refer to this snippet for an example of the issue |
Beta Was this translation helpful? Give feedback.
-
I have a MudDatePicker inside a MudForm using a Validator (Fluent Validation). The element has the For and the Validation attributes defined but when it is first time displayed is showing a
Error in validation func: Object reference not set to an instance of an object.
afterwards the picker validates the content as expected when there is no value given on form submission. Is the validator correctly defined? am I missing something? here are the code snippets:MudDatePicker element:
Object:
Validator:
Rendered for the first time:
![image](https://user-images.githubusercontent.com/31224181/144334974-c87075d8-c724-49e1-ab0f-bfa7bbad3c9b.png)
Form validation triggered on Form Submit with contents cleared (expected):
![image](https://user-images.githubusercontent.com/31224181/144335102-37281611-a6ac-4a1e-814b-1e392da5eec0.png)
Beta Was this translation helpful? Give feedback.
All reactions