This is a migrated thread and some comments may be shown as answers.

telerik maskedtextbox with a RegularExpressionValidator

0 Answers 64 Views
MaskedTextBox
This is a migrated thread and some comments may be shown as answers.
Stacy
Top achievements
Rank 1
Stacy asked on 27 Apr 2017, 05:21 PM

I'm using a Telerik maskedtextbox.  Let say the mask is '#####'.
I can enter 1-5 digits and all is good.

If I add a RegularExpressionValidator to the field, it will always fail unless I enter exactly the amount of digits specified in the mask.

ex.
just the maskedtextbox with mask '#####', I can enter 1, 11, 111, 1111, 11111 and all is good.
If I add a RegularExpressionValidator, it fails unless the input is 11111.

The regex expression works with anything as long as it's a number and only has issues when the masked textbox is used.

No answers yet. Maybe you can help?

Tags
MaskedTextBox
Asked by
Stacy
Top achievements
Rank 1
Share this question
or