This sample demonstrates that the custom mask functionalities of MaskedTextBox component. Enter time value in meridiem format, and enter IP value in numeric format.
The custom mask is achieved by the following ways:
In this demo, the “Time” mask '99 : 99 >PM' contains the literals P and M, where it is configured to allow the inputs as 'P', 'A', 'p', 'a', and 'M', 'm'.
Alternatively, you can use the regular expressions as mask element to validate the input of the particular input place.
Here, in the “IP Address” example, each character is masked by an regular expression to allow a particular range of values.