display error message with validation