Toloka documentation

PhoneNumberFieldV1

toloka.client.project.template_builder.fields.PhoneNumberFieldV1 | Source code

PhoneNumberFieldV1(
    self,
    data: Optional[BaseComponent] = None,
    *,
    placeholder: Optional[Union[BaseComponent, str]] = None,
    hint: Optional[Any] = None,
    label: Optional[Any] = None,
    validation: Optional[BaseComponent] = None,
    version: Optional[str] = '1.0.0'
)

Creates a field for entering a phone number.

Allows entering numbers, spaces, and the +, ( ), - characters. Only numbers and the + character at the beginning will remain in the data. For example, if you enter +7 (012) 345-67-89, the data gets the +70123456789 value.

Parameters Description

Parameters Type Description
data Optional[BaseComponent]

Data with values that will be processed or changed.

placeholder Optional[Union[BaseComponent, str]]

A semi-transparent label that is shown in an empty field.

hint Optional[Any]

Hint text.

label Optional[Any]

Label above the component.

validation Optional[BaseComponent]

Validation based on condition.