add validation error messages to input and show validation error message