I we are using a bound data object which was created by entity framework, same an Employee class. How do we use it with the class created to hold the form validation rules which are bound to the controls?
This forum post helped a lot, but the form controls are bound to the Employee class in the razor page and not the Employee class of my data access lay (EF Core) which is also called Employee.
I realize I can map between the two, but that basically makes the ease of using binding harder. Thanks for the help.
SPSureshkumar P Syncfusion Team January 3, 2020 02:44 AM
Greetings from Syncfusion support.
We have validated your requirement. we need to load the model class (entity class ex: Employee class) to load the data to the component to validate by using data annotation logic.
SPScott PealJanuary 4, 2020 05:49 AM
So what does that mean? Does that mean we need to map from/to the Entity Framework generated classes? If yes, that is a horible approach.
Is there any way to just extend the EF generated classes?
SPSureshkumar P Syncfusion Team January 8, 2020 03:54 AM
We will check the possibilities to add the form validator as our own library at our end. But our component will be working fine with the requested requirement Fluent validation. Please refer to the below sample if it is meet your requirement then you can use it in your application.
That Accelist.FluentValidation.Blazor package did the trick! I can still use my Entity Framework generated classes with validatation now. Adding this to the Syncfusion Blazor framework would be a value add to your customers.
Here is the URL to the project for others looking for a solution to this in the short term:
SPSureshkumar P Syncfusion Team January 21, 2020 02:28 AM
Thanks for your suggestion.
We have considered to provide “Provide support for form validation plugin in Blazor platform” at our end and this support will be included in any one of our upcoming releases. We will implement the feature based on the customer request count and priority.
You can track the status of the requested requirement from the below feedback link.