function validateGroupListingType
validateGroupListingType(
groupId: number,
listingType: ListingType,
customisableDays: boolean,
excludeListingId?: number,
): Promise<string | null>

Validate that a listing is compatible with a group's existing listings. Every listing in a group must share both the same ListingType and the same customisable_days setting, so the shared booking form can show a single day-count selector (or none) for the whole group. Returns an error message if mismatched, null if OK. Pass excludeListingId to skip a specific listing (for edit-self case).

Parameters

groupId: number
listingType: ListingType
customisableDays: boolean
optional
excludeListingId: number

Return Type

Promise<string | null>

Usage

import { validateGroupListingType } from "doc.ts";