# Setting the Mask in .NET MAUI MaskedEntry

The Telerik MaskedEntry for .NET MAUI exposes a `Mask`(`string`) property, which represents a string of characters restricting user input. The `Mask` property can contain literals and special mask characters depending on the used mask type (numeric, text, or regex).

## Mask for the NumericMaskedEntry

You can set one of the [Standard Numeric Format Specifiers](https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings#standard-format-specifiers) to the `Mask` property of the `RadNumericMaskedEntry`.

This example shows how to set the Percent (double) Mask

```XAML
<telerik:RadNumericMaskedEntry Mask="P" AutomationId="numericMaskP"/>
```

This example shows how to set the Fixed (decimal) Mask

```XAML
<telerik:RadNumericMaskedEntry Mask="F" AutomationId="numericMaskF"/>
```

This example shows how to set the Fixed (decimal) Mask

```XAML
<telerik:RadNumericMaskedEntry Mask="G" AutomationId="numericMaskG"/>
```

This example shows how to set the Decimal (decimal) Mask

```XAML
<telerik:RadNumericMaskedEntry Mask="N" AutomationId="numericMaskN"/>
```

This example shows how to set the Standard (long) Mask

```XAML
<telerik:RadNumericMaskedEntry Mask="D" AutomationId="numericMaskD"/>
```

This example shows how to set the Currency (decimal) Mask

```XAML
<telerik:RadNumericMaskedEntry Mask="C" AutomationId="numericMaskC"/>
```

## Mask for the TextMaskedEntry

To allow users to enter only numbers inside the `RadTextMaskedEntry`, apply the `Mask` for numeric restriction:

```XAML
<telerik:RadTextMaskedEntry Mask="(000) 000-000" PromptChar=" " AutomationId="textMaskNumbersOnly"/>
```

To allow users to enter only literals inside the `RadTextMaskedEntry`, apply the `Mask` for letter characters restriction:

```XAML
<telerik:RadTextMaskedEntry Mask="LLLLL" AutomationId="textMaskTextOnly"/>
```

## Mask for RegexMaskedEntry

You can define an input pattern of your choice and set it to the `Mask` property of the `RadRegexMaskedEntry`:

```XAML
<telerik:RadRegexMaskedEntry Mask="^(\+0?1\s)?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$" Placeholder="(415) 555-2671" AutomationId="regexMaskPhoneNumber"/>
```

> For the MaskedEntry Mask Types examples, go to the [SDKBrowser Demo Application](https://www.telerik.com/maui-ui/documentation/demos-and-sample-apps/sdkbrowser-app) and navigate to MaskedEntry -> Mask Types category.

## See Also

* [Mask Types](https://www.telerik.com/maui-ui/documentation/controls/maskedentry/mask-types/overview)
* [Value Format](https://www.telerik.com/maui-ui/documentation/controls/maskedentry/value-format)
* [Validation](https://www.telerik.com/maui-ui/documentation/controls/maskedentry/validation)
* [Setting Value](https://www.telerik.com/maui-ui/documentation/controls/maskedentry/value)
* [Null Values Support](https://www.telerik.com/maui-ui/documentation/controls/maskedentry/value#null-value-support})
* [Events](https://www.telerik.com/maui-ui/documentation/controls/maskedentry/events)
* [Globalization](https://www.telerik.com/maui-ui/documentation/controls/maskedentry/globalization)
