A user input error occurs whenever a user makes an invalid input that is not correctly handled by the program. For example, a user enters a postal code that doesn't exist, but the program accepts it.
User input errors have some similarities with program errors and resource errors: They are unpredictable, and their consequences can vary from totally harmless to extremely harmful. Therefore, the same principle of fail fast must be applied: Any wrong user input should immediately be detected by the program and handled properly.
Although the construction of good user interfaces, and the appropriate handling of invalid user input is not the scope of this manual, here are just a few tips that makes an application more user-friendly and more robust against erroneous user input:
Invalid user inputs should be detected and refused as soon as possible. For example, as soon as the user leaves an input field whose value will be assigned to an attribute, the program should check the value by calling the check script of that attribute (see the section called “Attribute check script”).
The programmer should always strive to use a GUI widget that doesn't permit the input of an invalid value. For example, if the type of attribute size is an enumerated type with values small, medium and large, a drop down list (or 3 radio buttons) with these values should be used instead of a text field, so that the user immediately sees the allowed values and is unable to make a mistake.
A user should always receive clear and helpful error messages in case of invalid input.