HTML code here
Users have entered input that could not be validated and they must be prompted to correct the input.
Tell the users that there is a problem and how to solve the problem. Also tell the users where the problem occurred.
Users have are trying to fill in Form and one or more of the fields is syntactically invalid or missing. Usually, there two kinds of problems: a) the field has not been filled in at all, or b) the field contains data in the wrong format.
The error message that is given needs to tell the users:
Although giving good error messages is important, one should always assess if the problem can be prevented! For example, using Constraint Input is can sometimes be possible to prevent incorrect input.
Obviously, users must be made aware of the fact that there is a problem. Doing this a the top of the page in a visual distinct box assures that users will see it. In addition, users must receive helpful information that will put them on track again. TO achieve that it is important to give help information near the problem field itself so that the "problem" and the "solution" are close to each-other.