calcom/cal.diy · error · BadRequestException
One or more invalid options for booking field '${eventTypeBo
Error message
One or more invalid options for booking field '${eventTypeBookingField.name}'. Allowed options are: ${allowedOptionValues.join(", ")}. What it means
Thrown during booking field validation for a 'multiselect' type field. When the submitted value is an array and the field defines options, areValidMultipleOptionValues checks every submitted element against allowed values; if any element is invalid, BadRequestException (HTTP 400) is raised. The message is identical in shape to the select/checkbox variants.
Source
Thrown at apps/api/v2/src/platform/bookings/2024-08-13/services/bookings.service.ts:315
const submittedValue = bookingFieldResponseValue as string | number;
const allowedOptionValues = eventTypeBookingField.options.map((opt) => opt.value);
if (!this.isValidSingleOptionValue(submittedValue, allowedOptionValues)) {
throw new BadRequestException(
`Invalid option '${submittedValue}' for booking field '${
eventTypeBookingField.name
}'. Allowed options are: ${allowedOptionValues.join(", ")}.`
);
}
}
break;
case "multiselect":
expectedBookingFieldResponseValueType = "array";
isValidType = Array.isArray(bookingFieldResponseValue);
if (isValidType && Array.isArray(eventTypeBookingField.options)) {
const submittedValues = bookingFieldResponseValue as (string | number)[];
const allowedOptionValues = eventTypeBookingField.options.map((opt) => opt.value);
if (!this.areValidMultipleOptionValues(submittedValues, allowedOptionValues)) {
throw new BadRequestException(
`One or more invalid options for booking field '${
eventTypeBookingField.name
}'. Allowed options are: ${allowedOptionValues.join(", ")}.`
);
}
}
break;
case "checkbox":
expectedBookingFieldResponseValueType = "array";
isValidType = Array.isArray(bookingFieldResponseValue);
if (isValidType && Array.isArray(eventTypeBookingField.options)) {
const submittedValues = bookingFieldResponseValue as (string | number)[];
const allowedOptionValues = eventTypeBookingField.options.map((opt) => opt.value);
if (!this.areValidMultipleOptionValues(submittedValues, allowedOptionValues)) {
throw new BadRequestException(
`One or more invalid options for booking field '${
eventTypeBookingField.name
}'. Allowed options are: ${allowedOptionValues.join(", ")}.`View on GitHub (pinned to 176037d0af)
Solutions
- Filter the submitted array to only values present in the field's options[].value.
- Re-fetch the event type to get the current option set before submitting.
- Trim/normalize submitted values to match stored option values exactly.
Example fix
// before
const responses = { topics: ['billing', 'old-option'] };
// after — only valid options
const allowed = ['billing','tech','sales'];
const responses = { topics: ['billing','tech'] }; Defensive patterns
Strategy: validation
Validate before calling
const allowed = field.options.map(o => o.value);
const submitted: unknown[] = body.responses.topics;
if (!submitted.every(v => allowed.includes(v))) throw new Error('Invalid multiselect values'); Type guard
function areValidMulti(values: unknown[], allowed: (string|number)[]): boolean {
return Array.isArray(values) && values.every(v => allowed.includes(v as string|number));
} Try / catch
try { await client.post('/v2/bookings', body); }
catch (e) {
if (e.status === 400 && /invalid options/i.test(e.message)) { /* filter array, retry */ }
else throw e;
} Prevention
- Filter submitted arrays through the allowed option set
- Cache option lists and invalidate on event type update
- Normalize string/number types to match stored options
When it happens
Trigger: A booking request submits an array for a multiselect field where one or more elements do not match any configured option value.
Common situations: One stale value in a previously-valid array after options were edited; mixing labels and values; duplicate or whitespace-laden entries.
Related errors
- Invalid option '${submittedValue}' for booking field '${even
- Team with slug ${body.teamSlug} not found
- Missing attendee phone number - it is required by the event
- Missing required booking field response: ${eventTypeBookingF
- Invalid type for booking field '${eventTypeBookingField.name
AI-assisted analysis of calcom/cal.diy@176037d0af (2026-08-12).
Data as JSON: /api/errors/1d90837ce67705d2.
Report an issue: GitHub.