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

MaskEditTextBox and regular expressions?

how can I create a mask for multiple expression. for example say I want to user to enter either a short zip code (5 digit) or a long zip code (zip +4)?

@Html.Syncfusion().MaskEditTextBoxFor(model => model.BusinessAddressZipCode, Model.BusinessAddressZipCode).Mask("99999")

@Html.Syncfusion().MaskEditTextBoxFor(model => model.BusinessAddressZipCode, Model.BusinessAddressZipCode).Mask("99999-9999")

I want to use a regular expression that would accept either formats, something like:

RegularExpression(@"(^(?!0{5})(\d{5})(?!-?0{4})(-?\d{4})?$)"

How can I do that?



1 Reply

GA Gurunathan A Syncfusion Team March 17, 2014 11:46 AM UTC

Hi John,

Thanks for contacting Syncfusion support.

 

We regret to let you know that currently we don’t have support to Mask Edit textbox with regular expression options. So we have added it to our feature request list and it can be tracked through our Features Management System:

http://www.syncfusion.com/support/directtrac/features/MVC-3174


You can communicate with us regarding the open features at any time using the “Contact” option.

Please let us know if you have any questions about this.
Thanks,
Gurunathan


Loader.
Live Chat Icon For mobile
Up arrow icon