Home Common Problem What can be used to control the format of input data in a text box

What can be used to control the format of input data in a text box

May 08, 2021 pm 02:10 PM

The input mask can be used to control the format of input data in the text box. "Input mask" refers to the characters that can control the input of data into the field. An input mask can include literal display characters and mask characters.

What can be used to control the format of input data in a text box

The operating environment of this article: windows7 system, DELL G3 computer

The input mask can be used to control the format of the input data in the text box. Validation rules are constraints that should be followed when entering data into a table.

"Input mask" refers to characters that can control the input of data into a field. An input mask can contain literal characters (such as brackets, periods, spaces, hyphens, etc.) and mask characters.

Input masks are mainly used for text and date fields, but can also be used for numeric and currency fields. For example, set the input mask of the "date of birth" field to "****year**month**day". Each "*" sign is called a "placeholder". The placeholder must use special characters (such as *, $ or @, etc.). It only occupies a position in the form, indicating that one digit can be accepted: and the "year, month, and day" are the original meanings. Display characters.

Character meaning

The meaning of the characters used in the input mask attribute is as follows:

0: You must enter a number (0-9), no The plus and minus signs - are allowed.

9: You can choose to enter numbers or spaces, plus and minus signs are not allowed.

#: You can optionally enter numbers or spaces, plus and minus signs are allowed, and spaces will be converted to spaces.

L: Must enter letters (A-Z).

?: You can choose to enter letters (A-Z). You can leave it blank or enter spaces.

A: Must enter letters or numbers.

a: You can choose to enter letters or numbers. You can leave it blank or enter spaces.

&: Any character or space must be entered.

C: You can choose to enter any character or space.

<: Convert all subsequent characters to lowercase.

>: Convert all subsequent characters to uppercase.

!: Makes the input mask display from right to left.

\(backslash): Make the following characters appear as literal characters.

Password: Any characters entered in the text box are saved literally, but appear as asterisks*.

For more related knowledge, please visit the FAQ column!

The above is the detailed content of What can be used to control the format of input data in a text box. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)