PDA

View Full Version : [CLOSED] Setup MaskRe for Textfield RAZOR



matrixwebtech
Aug 13, 2014, 3:15 AM
I need a text box which allow alphanumeric and don't allow space or special character in it except , (dot) and (-) hyphen it .
I read http://docs.sencha.com/extjs/4.2.1/#!/api/RegExp,but but unable to do exact MaskRe configuration for textfield in RAZOR

geoffrey.mcgill
Aug 13, 2014, 5:14 AM
Ok, so what regex patterns have you tried? Do you have a sample that demonstrates the scenario? Do you have some some sample input strings that we can test with?

We've asked you many times to post proper code samples, and unfortunately we will not be asking again. If you cannot post adequate code samples with your future posts, we will not help and you will not receive a reply from the Ext.NET support team.

geoffrey.mcgill
Aug 13, 2014, 5:17 AM
Please fully read and agree to the following Forum Guidelines before posting again in the Ext.NET forums:

http://forums.ext.net/showthread.php?3440-Forum-Guidelines-For-Posting-New-Topics

http://forums.ext.net/showthread.php?10205-More-Information-Required

matrixwebtech
Aug 13, 2014, 7:59 AM
Apologies for this,and thanks for your suggestion.I will keep this in mind from my next help request,by mistake I forget to post a my sample.

bellow is my sample code .which is works fine.


Html.X().TextField().MaskRe("^[A-Za-z0-9-.]+$")

but I want to add other characters if required .all I can add but problem with Space and (\).

Daniil
Aug 13, 2014, 9:33 AM
I would try this:

@Html.X().TextField().MaskRe(@"^[A-Za-z0-9-. \\]+$")

matrixwebtech
Aug 13, 2014, 7:30 PM
Thanks for help.