API Design · Junior · Question 36 of 75

Why should an API validate all input even if the official client already does?

Explanation

Validate types, ranges, formats and sizes, and reject unknown fields to avoid mass assignment.

Further reading

Problem with a question

API Design · Junior · question 36

Test yourself

Take the API Design · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz