Design input validation and error handling | Meta Interview Question