When the FormItem has a property of another class, I get an error when I try to display a form group.

I'm trying to create a form group and when I use those lines in the rectangle I get an error in the UI.

Image_1554_1704772843105


The structure of my classes:
Image_2647_1704772960204


The error:

Image_5017_1704773090719

can someone help me to find a way to solve this?


2 Replies

KP Kokila Poovendran Syncfusion Team January 24, 2024 07:29 AM UTC

Hi Roberto Perdomo,


We have already considered the reported issue “Exception occurs during complex type validation" as a bug from our end and the fix for the issue will be included with our upcoming patch release ,which is expected to be rolled out in mid-February 2024. Now you can track the status of the reported issue through the feedback below,


Feedback Link:https://www.syncfusion.com/feedback/50207/exception-occurs-during-complex-type-validation


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”



KP Kokila Poovendran Syncfusion Team February 1, 2024 10:43 AM UTC

Hi Roberto Perdomo,


To ensure thorough validation of complex models, it is necessary to apply the ValidateComplexType attribute in conjunction with the ObjectGraphDataAnnotationsValidator. This combination allows for comprehensive validation of the entire object graph of the model, as detailed in the official Microsoft documentation. Furthermore, when working with the DataForm component, it is advisable to employ a common abstract class as the base class for both the Model class associated with the DataForm and its dependent classes, as outlined in our UG documentation. Additionally, we have provided a sample for your reference.

Sample:https://blazorplayground.syncfusion.com/BjhJtsrOfsTVMfNH



Loader.
Up arrow icon