adding utility methods for validating user inputs
validating user inputs using utility methods
handling error responses in the client side