Trusted by the world’s leading companies
Overview
The ASP.NET Core Input Mask is a masked text box control that provides an easy and reliable way to collect user input based on a standard mask. It allows you to capture phone numbers, date values, credit card numbers, and other standard format values.
Standard masks
The Input Mask control supports the standard masks listed on MSDN.
Custom masks
Other than the standard mask elements, any custom character also can be a mask element by defining rules for it.
Regular expressions
The mask elements can be regular expressions, which is useful when defining user-specific data such as IP addresses.
Mask input combinations
The input mask control allows different mask combinations based on the standard and custom masks. So, you can form different mask formats based on your application scenarios.

Number mask
From the standard mask elements, form a number mask for capturing any finite-length number to get inputs such as phone and credit card numbers.

String mask
In the case of a country code or product key input, where the input string requires uppercase characters, the string mask format will enforce this.

Date mask
The mask can form any date format to get similarly formatted date values. This is helpful in getting culture-specific date values by defining the corresponding date mask.
Form support and validation
As a form component, this masked text box control proceeds with the raw format of the captured value when submitting the form.
You can also integrate the form validator plugin to perform any custom validation.
Adornments
The Input Mask control supports custom adornments using the prependTemplate and appendTemplate properties, which allow users to render custom elements like icons, buttons, or dropdowns to enhance user interaction with prefix and suffix elements.

HTML5 input type support
You can create the masked text box control from the HTML5 tel input. It opens the numeric keypad on mobile devices, which is useful for obtaining phone numbers and other number-only inputs.
Other frameworks
The ASP.NET Core Input Mask control is also available for the Blazor, JavaScript, Angular, React and Vue frameworks, which are built from their own TypeScript libraries.
Web accessibility
- Fully supports WAI-ARIA accessibility to work with screen readers and assistive devices.
- Follows WAI-ARIA best practices for implementing keyboard interaction.
- Follows WCAG 2.0 standards in the design of the UI element visuals such as the foreground color, background color, line spacing, text, and images.
Developer-friendly APIs
Developers can customize all UI elements and control behaviors of the ASP.NET Core input mask according to the end user’s requirements using its rich set of client-side APIs.
140+ ASP.NET CORE UI CONTROLS
Our Customers Love Us
Awards
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion® is proud to hold the following industry awards.