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.
JNJayaleshwari N Syncfusion Team January 24, 2019 05:28 AM
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.
CMChris MarinacciJanuary 25, 2019 02:09 PM
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.
public class RegularExpressionAttribute : ValidationAttribute
public RegularExpressionAttribute(String regexString)
: base(() => DefaultErrorMessageString)
RegexString = regexString;
public override Boolean IsValid(Object value)
return new Regex(RegexString).IsMatch((String)value);
SGSwathi Gopal Syncfusion Team January 31, 2019 10:49 PM
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.