We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Form Validation with a data source

Thread ID:

Created:

Updated:

Platform:

Replies:

150348 Jan 3,2020 12:15 AM UTC Jan 21,2020 10:28 AM UTC Blazor 6
loading
Tags: TextBox
Scott Peal
Asked On January 3, 2020 12:15 AM UTC

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.


Sureshkumar P [Syncfusion]
Replied On January 3, 2020 10:44 AM UTC

Hi Scott, 
 
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.  
 
Regards, 
Sureshkumar P 


Scott Peal
Replied On January 4, 2020 01:49 PM UTC

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?

Sureshkumar P [Syncfusion]
Replied On January 8, 2020 11:54 AM UTC

Hi Scott, 
 
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.  
 
 
Regards, 
Sureshkumar P 


Scott Peal
Replied On January 16, 2020 02:33 PM UTC

Hi Sureshkumar,

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:


Sureshkumar P [Syncfusion]
Replied On January 21, 2020 10:28 AM UTC

Hi Scott, 
 
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. 
 
 
Regards, 
Sureshkumar P 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon