In that case, the validation is performed as users work in the browser.For example, suppose you specify that a value should be an integer.Sometimes you have to validate information that doesn't come directly from an HTML form.
So you must check these values in order to protect your application. This test would pass the first time that the page is requested, but not when the request is a form submission.
However, the test will be performed in server code.
You can control how validation errors are displayed by defining CSS classes that have the following reserved names: .
For example, here's what the page looks like if you forget to enter a course name, if you enter an, and if you enter an invalid date: By default, user input is validated after users submit the page — that is, the validation is performed in server code.
A disadvantage of this approach is that users don't know that they've made an error until after they submit the page.
Comments Error validating