Abacum interview question

How would you validate user input on the API ?