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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Does the Xamarin.Forms version of SfDataForm support RegularExpressionAttribute?

Thread ID:





142237 Jan 23,2019 11:49 PM UTC Feb 1,2019 03:49 AM UTC Xamarin.Forms 3
Tags: SfDataForm
Chris Marinacci
Asked On January 23, 2019 11:49 PM UTC

The documentation for the Xamarin.Forms version of SfDataForm says that it supports RegularExpressionAttribute in the "Data annotations" section, but this type does not appear to be included in the SfDataForm NuGet package.

Jayaleshwari N [Syncfusion]
Replied On January 24, 2019 10:28 AM UTC

Hi Chris, 
Thanks for contacting Syncfusion Support.  
We have checked the reported query “Does the Xamarin.Forms version of SfDataForm support RegularExpressionAttribute?” from our side. we regret to let you know that SfDataForm does not support RegularExpressionAttribute. We will remove and update our user guide documentation. 
Please let us know if you would require further assistance. 
Jayaleshwari N. 

Chris Marinacci
Replied On January 25, 2019 07:09 PM UTC

Hi Jayaleshwari,

I was able to add the support myself by creating the file RegularExpressionAttribute.cs, below. You might want to consider adding this to your product.



using System;
using System.Text.RegularExpressions;

namespace Syncfusion.XForms.DataForm
    public class RegularExpressionAttribute : ValidationAttribute
        private static String DefaultErrorMessageString => String.Empty;

        public String RegexString { get; }

        public RegularExpressionAttribute(String regexString)
            : base(() => DefaultErrorMessageString)
            RegexString = regexString;

        public RegularExpressionAttribute()
            : this(null)

        public override Boolean IsValid(Object value)
            return new Regex(RegexString).IsMatch((String)value);

Swathi Gopal [Syncfusion]
Replied On February 1, 2019 03:49 AM UTC

Hi Chris, 
We have checked your query with support for RegularExpressionAttribute in SfDataForm Xamarin.Forms and currently SfDataForm does not support RegularExpressionAttribute. Thank you for requesting this feature and helping us define it. We are always trying to make our products better and feature requests like yours are a key part of our product growth efforts. We have added this feature request to our database. You can now track the current status of this feature request here. 
At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We will let you know when this feature is implemented. 
Swathi G 


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