What is the best way to show an error message when a user input some wrong data and submit?
Error messages should be clearly indicated
And you should be clear where that error has been made. You can do this by: Highlighting the field in question visually, usually with an outline around the input in a bright noticeable colour (usually red) Adding additional icons or visual cues to draw attention to the mistake.