Return error messages when a validation error occurred