div-fixed-length-input-mask

Mask for entering text with a fixed number of characters.

Parameters

Parameters Description
pattern

string

Required parameter.

String that sets the text input template. For example, the +7 (###) ###-##-## template for a phone number.

pattern_elements

array

Required parameter.

Template decoding is a description of the characters that will be replaced with user input.

An array must not be empty.

raw_text_variable

string

Required parameter.

Name of the variable to store the unprocessed value.

type

string

Required parameter.

The value must always be fixed_length.

always_visible

bool_int

If this option is enabled, the text field contains the mask before being filled in.

Default value: false.

pattern_element

Parameters Description
key

string

Required parameter.

A character in the template that will be replaced with a user-defined character.

A string must not be empty.

placeholder

string

The character that's displayed in the input field where the user is expected to enter text. This is used if mask display is enabled.

A string must not be empty.

Default value: _.

regex

string

Regular expression for validating character inputs. For example, when a mask is digit-only.

JSON
{
  type*: "fixed_length",
  always_visible: "bool_int",
  pattern*: "string",
  pattern_elements*: [
    {
      key*: "string",
      placeholder: "string",
      regex: "string"
    },
    ...
  ],
  raw_text_variable*: "string"
}