handle validation error