InputMask

Formats a field as you type — phones, dates, cards and codes.

Features10APIThemingAccessibility

Phone

9 is a digit. Brackets, spaces and dashes are typed for you.

Value: —

Date

A date mask; inputmode="numeric" opens the number keyboard on phones.

Card

Card number and expiry. (completed) fires when the required part is filled.

Type 16 digits

Letters

a is a letter, * a letter or a digit. characterPattern changes what a accepts — here Cyrillic as well.

Optional

Everything after ? is optional — the value is complete without it.

Value: —

Unmask

unmask writes only the typed characters to the model — handy for APIs. The field still shows the mask.

Model: 12345678

Slot char

slotChar is shown in empty positions while the field has focus — one character, or a whole hint of the same length.

Auto clear

By default an incomplete value is cleared on blur. [autoClear]="false" keeps what was typed.

Clear

With tx-icon-field, tx-input-clear empties the masked field.

Form

Inside tx-field with Validators.required — incomplete values are cleared on blur, so the required error shows.

We call only about your order.