Skip to main content

Option Constraints & Validation

Constraints let you control and validate customer input for your product options. Set character limits, numeric ranges, file types, and date restrictions to ensure customers provide the right information.

Updated this week

Available Constraints by Option Type

Text Input Constraints

For text input and paragraph text input options, you can set:

  • Minimum Characters: Require customers to enter at least this many characters

  • Maximum Characters: Limit text to a maximum number of characters (up to 280)

Example use cases:

  • Require at least 3 characters for personalized names

  • Limit engraving text to 40 characters

  • Set a minimum of 10 characters for custom messages

Number Input Constraints

For number options, you can set:

  • Minimum Value: The lowest number customers can enter

  • Maximum Value: The highest number customers can enter

  • Step Increment: Force values to be multiples of a specific increment (e.g., 0.5, 5, 10)

Example use cases:

  • Require quantities between 1 and 100

  • Allow only even numbers with a step of 2

  • Set decimal increments like 0.25 for measurements

File Upload Constraints

For file upload options, you can set:

  • Allowed File Extensions: Comma-separated list of accepted file types (e.g., jpg, png, pdf)

  • Max File Size: Maximum file size in MB

Example use cases:

  • Only accept image files: jpg, png, gif

  • Limit uploads to 5MB for faster processing

  • Accept documents: pdf, doc, docx

Date Input Constraints

For date options, you can set:

  • Earliest Date Allowed: The first date customers can select

  • Latest Date Allowed: The last date customers can select

  • Disabled Weekdays: Block specific days of the week (e.g., no Sundays or Mondays)

  • Excluded Dates: Comma-separated list of specific dates to exclude (format: YYYY-MM-DD)

Example use cases:

  • Block past dates by setting earliest date to today

  • Disable weekends for business day delivery

  • Exclude holidays: 2025-12-25, 2025-12-26

  • Limit bookings to the next 90 days

Setting Constraints

Constraints appear in the sidebar when editing an option:

  1. Go to your option group

  2. Click on the option you want to configure

  3. In the sidebar, find the relevant constraint section (Text Constraints, Numeric Constraints, etc.)

  4. Enter your constraint values

  5. Save your changes

The constraint section only appears for option types that support it. For example, Text Constraints only show for text input and paragraph text input options.
​

How Constraints Work

  • Constraints are validated in real-time as customers fill out the form

  • If a customer violates a constraint, they'll see an error message and cannot add the product to cart

  • All constraint fields are optional - leave them empty if you don't need restrictions

  • Constraints work together with the "Required" setting

Tips

  • Combine min and max values to create valid ranges (e.g., 5-50 characters)

  • Use step increments to simplify choices (e.g., quantities in multiples of 5)

  • For dates, set earliest_date to prevent past date selection

  • Test file upload constraints with various file sizes and types

  • Document your constraints in the option description for transparency

Did this answer your question?