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

Masking for Phone With or Without Extension

2 Answers 339 Views
MaskedTextBox
This is a migrated thread and some comments may be shown as answers.
Laurie
Top achievements
Rank 2
Laurie asked on 05 Jun 2015, 04:19 PM

Is it possible to mask a phone number with or without an extension?  I'm looking for:

(612) 555-1212

or

(612) 555-1212 ext. 5

or

(612) 555-1212 ask for Larry

 Basically, the beginning of the string must be formatted as a phone number, but the user can enter whatever they want after that. 

 Can I do it?

 Thanks!

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 09 Jun 2015, 11:25 AM
Hello Laurie,

The widget's mask can be defined with a strict length only. That being said, you can define a longer mask and discard the not populated value. Here is a demo that demonstrates this approach:
Regards,
Georgi Krustev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Laurie
Top achievements
Rank 2
answered on 09 Jun 2015, 02:57 PM
Perfect! Thanks so much, Georgi.
Tags
MaskedTextBox
Asked by
Laurie
Top achievements
Rank 2
Answers by
Georgi Krustev
Telerik team
Laurie
Top achievements
Rank 2
Share this question
or