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

selectionValidators

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.

There's one exception: near the end of the sales, when the venue is almost completely sold-out, we allow single empty seats in some cases. E.g. in the example below, the ticket buyer has to leave an empty seat if he wants 2 seats. In that case, we don't consider the empty seat an orphan:

mode

You can make the orphan seats validator less restrictive by passing in mode: 'lenient':

selectionValidators: [
    {type: 'noOrphanSeats', mode: 'lenient'}
]

In lenient mode, single empty seats are not considered orphans if there's no other way than to leave an empty seat in the current 'block'. Meaning: in the current group of selectable seats that are next to each other:

The default mode is 'strict'.

social distancing

When you apply a social distancing ruleset with disabled seats to the sides, we automatically enable the orphan seats validator. If you want to disable it, you can do so by passing in

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

highlight

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'}
]

Updated 4 months ago

selectionValidators


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.