Tuesday, June 27, 2006

Forms: Input validation

Input text and text areas

  1. For required fields, is string empty? Remove trailing spaces.
  2. Scope of string. (numeric, letters only ??)
  3. Minimum and maximum length of string.

Input file

  1. Is string empty?
  2. Does file exist?
  3. File must be of valid type.
  4. Limit the type of files that can be uploaded.

Check box

  1. Grouped check boxes must be same name.
  2. If multiple check boxes, can check multiple boxes.
  3. If field is required, at least one check box checked or depending on specs.

Radio button

  1. Grouped radio buttons must be same name.
  2. If multiple radio buttons, can only check one radio button per group.
  3. If field is required, must have ticked a radio button.

Selections (Dropdown)

  1. Do not put default empty value if required field.
  2. Check other dropdown in same group if not selected. (like in date and time)
  3. For group selections, check format or combination.

Input submit (Submit button)

  1. Do not submit if there are invalid input in form.

Input reset (Reset button)

  1. All default values must be returned as if the form was loaded again from the start.

No comments: