Validate Request Input
Talk it through out loud with your AI coach.
The problem
- easy
Your sign-up endpoint trusts whatever JSON the client sends, and the database has filled with empty names and impossible ages. Explain how and where you'd validate request input on the server.
What a strong answer covers
- Why browser-side checks alone can never be relied on.
- Where in the request's path validation belongs and what it checks.
- A useful error response the client can act on.
- Guarding against fields the client was never meant to set.
Common mistake: Validating only in the form, or quietly saving bad data instead of rejecting it.
Knowing this is half of it. Saying it clearly out loud is the part the coach helps you practise.
Practise it out loud