Описание тега masking
Force user input to conform to given rules.
Input masking restricts inputs for a given UI element without actually performing validation. Instead of collecting and validating user input, the masking approach restricts the inputs that a user can make in the first place.
An example of this would be a text field that is set to accept telephone numbers from a given country: instead of collecting digits and letters, and then validating them against the format, an input-masked field will only allow digits to be input, and will only accept them in an order that forms a valid input.