The CSS rules that end in to both have the same fixed size.
That way, the display area for the field is static and won't change the page flow if an error message is displayed.
can anybody tell me how do u validate a listbox to select atleast one item from it. You can validate it by looping over the options (see example) and checking how many are selected (check the selected property). these listboxes are dynamic and can vary from 1 to 4.
In many cases, the values you need are some other data types, like integers or dates.
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.
A typical example is a page where a value is passed in a query string, as in the following example: source, including form-field values, query-string values, and cookie values.