-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
[Bug] Version 2.1.0 generates System.InvalidOperationException #194
Comments
Same for me...Is there a fix for this problem? |
As a workaround, downgrading to 2.0.3 has been effective for me |
Yes, in 2.0.3 it works. Hope in a new release it will be fixed. |
This is affecting my project as well. |
I'm seeing this as well. It looks like the issue is with complex model that contain an array (in my case a List) of complex model objects. public class Foo
{
public int Id { get; set; }
public int Name { get; set; }
}
public class Bar
{
public int Id { get; set; }
public List<Foo> Foos { get; set; }
} Then you render the enumeration inside of an <EditForm Model="BarInstance">
<FluentValidationValidator />
@* Probably a bunch of form fields here *@
@foreach(var foo in BarInstance.Foos)
{
<InputText @bind-Value="foo.Name" />
}
</EditForm> Once you modify the input that is bound to that child components property you will get the exception. Looks like the validator is passing that child class instance to the parent validator and the validator is rightfully complaining that it can't validate that type. |
Describe the bug
I get the following exception (see screenshot 1) when using version 2.1.0 but everything is fine with 2.0.3.
To Reproduce
Steps to reproduce the behavior:
When using 2.0.3 I just click on a dropdown that will specify the attachment to open. The list used by drop-down is not even part of the model.
Expected behavior
No exception, just like with version 2.0.3. I'm using an EditContext (no choice here, it must be an EditContext) instead of an EditForm.
Hosting Model (is this issue happening with a certain hosting model?):
Additional context
TabGeneral.razor
TabGeneral.razor.cs
AttachmentList .razor
AttachmentLis.razor.cs:
Model
The text was updated successfully, but these errors were encountered: