HTML - Single Field Validation
HTML by itself provides some simple components to help validate user
input. These are useful in Forms that are built with HTML and can provide
some simple checking such as:
- Limit Max length of a text field
- Limit choices to one of a selection
- Limit choices to several from a selection
- Use checkboxes to collect multiple selections
- Use radio buttons to collect a single choice
It's useful to understand this basic capability first so that we know
what it is that we are extending through the use of JavaScript, Java, and
ActiveX controls.
ADVANTAGES:
- Simple to use existing HTML components.
- No programming required.
DISADVANTAGES:
- Limited validation capability.
- No run-time control unless using JavaScript.
- Limited control of components at run-time even with JavaScript.
- Limited choice of components. Can not be extended.
- Control must be statically embedded into HTML file.
- Can not do Inter-field checks with just HTML.
The remainder of the page demonstrates some of these components:
Source: View or Save this HTML file
to obtain the HTML markups that do this validation. There are no scripts or
Applets used for this page.