Skip to content

TextFieldType

Source code in docs_src/capo_partnercentral_marketing/types/text_field_type.py
class TextFieldType(TypedDict, closed=True):
    min_length: NotRequired["int"]
    """Minimum accepted length."""
    max_length: NotRequired["int"]
    """Maximum accepted length."""
    pattern: NotRequired[
        "capo_partnercentral_marketing.types.template_field_pattern.TemplateFieldPattern"
    ]
    """Regular expression the value must match — used for URL, email, phone and hex-colour fields."""
    placeholder: NotRequired[
        "capo_partnercentral_marketing.types.asset_body_content.AssetBodyContent"
    ]
    """Example text shown where the field is empty in a preview of the asset. Never the asset's value: it is not set on the asset at create, does not fill a required field, and is never published."""

max_length instance-attribute

max_length: NotRequired[int]

Maximum accepted length.

min_length instance-attribute

min_length: NotRequired[int]

Minimum accepted length.

pattern instance-attribute

pattern: NotRequired[TemplateFieldPattern]

Regular expression the value must match — used for URL, email, phone and hex-colour fields.

placeholder instance-attribute

placeholder: NotRequired[AssetBodyContent]

Example text shown where the field is empty in a preview of the asset. Never the asset's value: it is not set on the asset at create, does not fill a required field, and is never published.