Preview

CartFieldValidation is in Preview status and is subject to change without notice. For more information about Preview status, see the GraphQL API policy.

CartFieldValidation

Validation configuration for a cart field

This page contains

    Fields

    required: Boolean!

    Whether the field is required or optional

    readOnly: Boolean!

    Whether the field is read-only or editable

    minLength: Int

    Minimum length of the field value

    maxLength: Int

    Maximum length of the field value

    minValue: String

    Minimum allowed value for the field

    maxValue: String

    Maximum allowed value for the field

    expression: String

    Regular expression pattern for field validation

    validationType: CartFieldValidationType PREVIEW

    Additional validation type, used for purchase and subscription custom attributes

    Parent objects of CartFieldValidation

    CartField PREVIEW

    A form field in the cart