The masked text box component provides an easy and reliable way to collect user input based on a standard mask. It can be used to capture phone numbers, date values, and other standard format values.
The masked text box supports the standard masks listed on MSDN.
Other than the standard mask elements, any custom character can also be used as a mask element by defining its rules.
The mask elements can be a regular expression also, which is useful when defining user specific data such as IP address.
Based on the standard and custom mask combinations, different masks can be created for different application scenarios.
From the standard digit mask element, any numeric mask can be created for capturing any finite-length number, such as serial numbers.
In the case of a country code or product key input where the input string requires uppercase characters, the mask will enforce this.
The mask can form any date format to obtain similarly formatted date values.
As a form component, the captured value proceeds in the raw format when the form is submitted.
The form validator plugin can be integrated to perform any custom validation before the form is submitted.
The masked text box can be extended from the HTML5 tel input. It opens the numeric keypad on mobile devices, which is useful for obtaining phone numbers or any other number-only inputs.
You have control over all UI elements and behaviors of the masked text box through its rich set of developer-friendly APIs to provide the best experience to your end users.