Skip to content

FieldConstraint

Source code in docs_src/capo_cloudextensions/types/field_constraint.py
class FieldConstraint(TypedDict, closed=True):
    field: NotRequired["str"]
    """The path of the field that failed validation, with nested members joined by dots, such as `versionPolicy.versionSelector`."""
    value: NotRequired["str"]
    """The value the constraint evaluated: the field's value, or its length when the constraint is len."""
    constraint: NotRequired["str"]
    """The reason why the field's value is invalid."""
    constraint_values_from: NotRequired[
        "capo_cloudextensions.types.constraint_value_sources.ConstraintValueSources"
    ]
    """Where each of the constraint's values came from, when any was read from another field. Each entry is the path of that field, or a {label} such as {account.maxExtensionSize} for a value the caller doesn't set."""

constraint instance-attribute

constraint: NotRequired[str]

The reason why the field's value is invalid.

constraint_values_from instance-attribute

constraint_values_from: NotRequired[ConstraintValueSources]

Where each of the constraint's values came from, when any was read from another field. Each entry is the path of that field, or a {label} such as {account.maxExtensionSize} for a value the caller doesn't set.

field instance-attribute

field: NotRequired[str]

The path of the field that failed validation, with nested members joined by dots, such as versionPolicy.versionSelector.

value instance-attribute

value: NotRequired[str]

The value the constraint evaluated: the field's value, or its length when the constraint is len.