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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Using INotifyDataErrorInfo

Thread ID:

Created:

Updated:

Platform:

Replies:

140628 Oct 29,2018 06:16 PM UTC Oct 30,2018 12:25 PM UTC UWP 1
loading
Tags: SfTextBox
Frangoudes Panikos
Asked On October 29, 2018 06:16 PM UTC

Hello, I am trying to build a user input validation strategy using Syncfusion input controls for LOB Applications.
Is it possible to use the INotifyDataErrorInfo with Syncfusion Input controls and if yes can you provide one or more examples of using it
Thank you in advance
Best regards
Panikos Frangoudes

Muneesh Kumar G [Syncfusion]
Replied On October 30, 2018 12:25 PM UTC

Hi Frangoudes, 
 
Thanks for using Syncfusion products.  
 
We have analyzed your requirement and we would like to inform you that by default data validation available in SfTextBox itself. Please find the code snippet for this.  
 
Code snippet 
 protected override IEnumerable<DataValidationError> GetPropertyErrors(
            string propertyName, object value)
        {
            var result = new List<DataValidationError>();
 
  
            switch (propertyName)
            {
                case nameof(TextField1):
                    
                            //Place your validation here
                    
                    break;
            }
 
  
            return result;
        }
 
 
 
We have prepared a sample for using the IEnumerable <DatavalidationError>.In this we can perform error validation by using the following codes 
 
 
In this sample we have perform error validation for two SfTextBox, one for validate entry size and another one for check text is “foo”. 
 
 
Please let us know if you have any queries.  
 
Regards, 
Muneesh Kumar G. 


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

or the page will be automatically redirected to 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

;