Mask Types

The MaskedEntry provides a number of mask types, which enable you to restrict user input to a specific type such as email, text, and more.

Email Mask

To validate the user input as an email entry, use the EmailMaskedEntry. The resulting value is a string object.

To enable the email mask type, set the RadEmailMaskedEntry instance:

<telerik:RadEmailMaskedEntry/>

The following image shows the end result.

RadEmailMaskedEntry

Numeric Mask

To validate the user input as numeric values, use the NumericMaskedEntry.

The numeric mask displays the following values:

  • Percent values.
  • Decimal values.
  • Currency (culture-aware).
  • Fixed point values.

Through the Mask property you can specify the exact format of the expected input. The following example demonstrates how to set the RadNumericMaskedEntry with the Currency value.

<telerik:RadNumericMaskedEntry Mask="C" />

The following image shows the end result.

RadNumericMaskedEntry

Regex Mask

To validate the user input as a standard (alphanumeric) user input against a regular expression, use the RegexMaskedEntry, which provides errors if the regular expression (regex) rule is not matched. The resulting value is a string.

The following example demonstrates how to set the RadRegexMaskedEntry.

<telerik:RadRegexMaskedEntry x:Name="regexMaskedEntry" Mask="^[a-z]$" PlaceholderText="^[a-z]$" />

The following image shows the end result.

RadRegexMaskedEntry

IP Mask

To validate the user input as an IP Address input, use the IPMaskedEntry. The resulting value is a string object.

The following example demonstrates how to create a RadIPMaskedEntry.

<telerik:RadIPMaskedEntry/>

The following image shows the end result.

RadIPMaskedEntry

Text Mask

To validate the user input as text symbols, use the TextMaskedEntry. The resulting value is a string object.

The following example demonstrates how to create a RadTextMaskedEntry.

<telerik:RadTextMaskedEntry x:Name="textMaskedEntry" Mask="aaaaaaaaaaaaaaaaaaaa" />

The following image shows the end result.

RadTextMaskedEntry

For the Mask Types example, refer to the SDKBrowserMaui Demo Application.

See Also

In this article
Not finding the help you need?