New to Telerik UI for .NET MAUI? Start a free 30-day trial

.NET MAUI MaskedEntry Validation Message

The Telerik MaskedEntry for .NET MAUI provides a built-in validation message. If the user is entering an input that does not match the mask requirements, the MaskedEntry will display an error message.

Default Error Message

The MaskedEntry supports a default validation error message that is based on the used masked type:

  • EmailMaskedEntry—Supports the E-Mail is not valid error message.

  • RegexMaskedEntry—Supports the Input does not match the regex error message.

Custom Error Message

To customize the default validation error message, use the ValidationErrorMessage(string) property.

  • Custom Validation Error Message for the EmailMaskedEntry
<telerik:RadEmailMaskedEntry x:Name="emailMaskedEntry" ValidationErrorMessage="Please, enter a valid e-mail adress" AutomationId="emailMask" />
  • Custom Validation Error Message for the RegexMaskedEntry
<telerik:RadRegexMaskedEntry x:Name="regexMaskedEntry" Mask="^[a-z]$" Placeholder="^[a-z]$" ValidationErrorMessage="Only one symbol can be entered" AutomationId="regexMask" />

For the MaskedEntry Validation Error Message example, go to the SDKBrowser Demo Application and navigate to MaskedEntry -> Features category.

See Also

In this article