validating user input using annotations