Skip to main content

ValidateToFrozenSet

No overview available.

Attributes

AttributeTypeDescription
pyPythonThe Python interpreter instance used for managing object lifecycle and memory within the validation context.
input[Input](../../input/input/abstract/input.md?sid=input_input_abstract_input)The raw input data being validated and converted into a frozen set.
f_setBound< PyFrozenSet >A reference to the Python frozenset object being populated during the validation process.
max_lengthusizeThe maximum number of elements allowed in the resulting frozen set; validation fails if this limit is exceeded.
item_validator[CombinedValidator](../mod/combinedvalidator.md?sid=validators_mod_combinedvalidator)The validator instance applied to each individual element within the input collection.
state[ValidationState](../validation/state/validationstate.md?sid=validators_validation_state_validationstate)The current validation state used to track errors, context, and recursive depth across the validation tree.
fail_fastboolA flag that determines whether to stop validation immediately upon encountering the first error.

Constructor

Signature

def ValidateToFrozenSet(
py: Python< 'py >,
input: &'a I,
f_set: &'a Bound< 'py, PyFrozenSet >,
max_length: Option< usize >,
item_validator: &'a CombinedValidator,
state: &'a mut ValidationState< 's, 'py >,
fail_fast: bool
)

Parameters

NameTypeDescription
pyPython< 'py >The Python interpreter instance.
input&'a IThe input data to be validated.
f_set&'a Bound< 'py, PyFrozenSet >The target frozen set object.
max_lengthOption< usize >Optional maximum length constraint for the set.
item_validator&'a CombinedValidatorThe validator used for individual items within the set.
state&'a mut ValidationState< 's, 'py >The current state of the validation process.
fail_fastboolWhether to stop validation immediately upon the first error.

Methods


validate()

def validate(
input: [Input](../../input/input/abstract/input.md?sid=input_input_abstract_input),
state: [ValidationState](../validation/state/validationstate.md?sid=validators_validation_state_validationstate)
) - > Bound< 'py, PyFrozenSet >

Validates the input data against the frozen set constraints and item-level validation rules.

Parameters

NameTypeDescription
input[Input](../../input/input/abstract/input.md?sid=input_input_abstract_input)The raw input data to be validated and converted into a frozen set.
state[ValidationState](../validation/state/validationstate.md?sid=validators_validation_state_validationstate)The current validation context used to track errors and recursion depth.

Returns

TypeDescription
Bound< 'py, PyFrozenSet >A new frozen set containing the validated and potentially transformed items.