All jobs / Backend developer / API Development

Backend developer interview question · 1–3 years

The interviewer asks: “Where do you validate input?” Strongest answer?

The strongest answer

At the HTTP edge (schema, types, limits) and again as domain rules (this user may not approve their own expense). I never trust the client or a second internal caller by default.

Why it works

Exactly. Edge validation gives cheap 400s. Domain rules belong next to the decision. Defense in depth — DB constraints are the last net, not the first.

What a good answer covers

Answers that fall short

Who gets asked this

More API Development questions