html5 mask,HTML5/JavaScript Input Mask | Masked Textbox |Syncfusion

Overview

The HTML5/JavaScript Input Mask or masked textbox is a 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 mask

The HTML5/JavaScript input mask control supports the standard masks listed on MSDN.

Custom mask

Other than the standard mask elements, any custom character also can be a mask element by defining rules for it.

Regular expression

The mask elements can be regular expressions, which is useful when defining user-specific data such as IP addresses.

Mask input combinations

The HTML5/JavaScript 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.

af82974196da76f8e6fab1c906c674eb.gif

Number mask

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

fff930733d229a5979714b42c1f7a04b.gif

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.

d8ce1ac5dc8cd5d29ef5393be8f0e303.gif

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, the captured value of a masked textbox control proceeds in the raw format when submitting the form.

You can also integrate the form validator plugin to perform any custom validation.

HTML5 input type support

You can create the masked textbox control from the HTML5 tel input. It opens the numeric keypad on mobile devices, which is useful for obtaining phone numbers or any other number-only inputs.

0edb00e20a76e21ab2e9df6a1ab2d4da.png

Other supported frameworks

The Input Mask component is also available in Blazor, React, Angular, and Vue frameworks. Check out the different Input Mask platforms from the links below,

Web accessibility

Fully supports WAI-ARIA accessibility to work with screen readers and assistive devices.

Follows WAI-ARIA best practices for implementing keyboard interaction.

Designs the UI element visuals such as foreground color, background color, line spacing, text, and images based on WCAG 2.0 standard.

Developer-friendly APIs

Developers can customize all UI elements and control behaviors of the JavaScript input mask according to the end user’s requirements using its rich set of client-side APIs.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值