I'm using the UI for MVC MaskedTextBoxFor construct with phone numbers.
For basic areacode+number, it's working fine. But I don't see anything in the documentation about how to add an additional optional extension number to the end - for a maximum form of "(000) 000-0000 x09999". In your documentation I saw no predefined mask rules for optional parts of the mask.
I see that I can do the validation part of this with a regex rule but don't see how to get the mask to automatically insert the " x" after the end of the "3333" part of the number in preparation of an option 1 to 5 number extension if and only if the user continues typing characters after typing the primary number "(000) 000-0000" part.
I'm assuming that this should be able to be be done via a custom mask rule function, but didn't see any examples in your documentation involving optional pieces of content where fixed content like the " x" will be auto-added for the user.
Thanks!
-Bob
For basic areacode+number, it's working fine. But I don't see anything in the documentation about how to add an additional optional extension number to the end - for a maximum form of "(000) 000-0000 x09999". In your documentation I saw no predefined mask rules for optional parts of the mask.
I see that I can do the validation part of this with a regex rule but don't see how to get the mask to automatically insert the " x" after the end of the "3333" part of the number in preparation of an option 1 to 5 number extension if and only if the user continues typing characters after typing the primary number "(000) 000-0000" part.
I'm assuming that this should be able to be be done via a custom mask rule function, but didn't see any examples in your documentation involving optional pieces of content where fixed content like the " x" will be auto-added for the user.
Thanks!
-Bob