NumberFieldV1

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

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

A component that allows you to enter a number.

The box already has validation: by default, Tolokers can enter only numbers and decimal separators. They can use either a dot or a comma as a separator, but there will always be a dot in the output.

When the Toloker is entering a number, the separator automatically changes to the one specified in the regional settings.

Negative numbers are allowed by default. To disable them, use the validation property. Pressing the up or down arrow keys will increase or decrease the number by one.

Parameters Description

ParametersTypeDescription
dataOptional[BaseComponent]

Data with values that will be processed or changed.

maximumOptional[Union[BaseComponent, int]]

Maximum number that can be entered.

minimumOptional[Union[BaseComponent, int]]

Minimum number that can be entered.

placeholderOptional[Any]

A semi-transparent label that is shown in the box when it is empty.

hintOptional[Any]

Hint text.

labelOptional[Any]

Label above the component.

validationOptional[BaseComponent]

Validation based on condition.

Toloka-Kit
OverviewGetting OAuth tokenQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming