Seats.io

The seatsio Developer Hub

Welcome to the seatsio developer hub. You'll find comprehensive guides and documentation to help you start working with seatsio as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

selectionValidators

sectionValidators

Type: array
Default: []

selectionValidators: [
    {type: 'noOrphanSeats'},
    {type: 'consecutiveSeats'},
]

Selection validators run every time a seat is selected or deselected. They check whether there are no orphan seats, and/or whether all selected seats are consecutive (meaning: next to each other and in the same category).

If the selection is valid, onSelectionValid is triggered. If not, onSelectionInvalid is triggered.

A typical way to use this is to disable the checkout button on your form and to show a warning when onSelectionInvalid is triggered.

selectionValidators.noOrphanSeats

selectionValidators: [
    {type: 'noOrphanSeats'}
]

Checks for orphan seats. An orphan is a single seat that's left open.

By default, orphans are highlighted by an exclamation mark, and are colored red. If you prefer this doesn't happen, pass in highlight: false.

selectionValidators: [
    {type: 'noOrphanSeats', highlight: false}
]

selectionValidators.consecutiveSeats

Checks for seats that are not on the same row or not next to each other. Also, it checks for seats that don't have the same category.

selectionValidators: [
    {'type': 'consecutiveSeats'}
]