toloka.client.project.template_builder.conditions.AllConditionV1
| Source code
AllConditionV1( self, conditions: Optional[Union[BaseComponent, List[BaseComponent]]] = None, *, hint: Optional[Any] = None, version: Optional[str] = '1.0.0')
Checks that all nested conditions are met.
For more information, see condition.all.
Parameters | Type | Description |
---|---|---|
conditions | Optional[Union[BaseComponent, List[BaseComponent]]] | A list of conditions. |
hint | Optional[Any] | A hint that is shown if the condition is not met. |
Examples:
import toloka.client.project.template_builder as tbcoordinates_validation = tb.conditions.AllConditionV1( [ tb.conditions.RequiredConditionV1( tb.data.OutputData('performer_coordinates'), hint="Couldn't get your coordinates. Please enable geolocation.", ), tb.conditions.DistanceConditionV1( tb.data.LocationData(), tb.data.InputData('coordinates'), 500, hint='You are too far from the destination coordinates.', ), ],)
Last updated: August 28, 2023