A user submits a booking. What do you validate, and where does each check live?
Answer it out loud before you open anything. The value of the flags below is in comparing them to what you actually said.
The situation behind the question
The request has a date range, a room id, a guest count and a promo code. The team has a schema library on the route, and someone has proposed moving "all validation" into the database as constraints.
What it is really testing
Whether the candidate separates three genuinely different questions — is it well-formed, is it allowed by the business, and is it consistent with what the database already holds — instead of treating validation as one layer that can be moved around.