Validating form data

In computer science, data validation is the process of ensuring that a program operates on clean, correct and useful data.

validating form data-30

Data validation rules can be defined and designed using any of various methodologies, and be deployed in any of various contexts.

Data validation rules may be defined, designed and deployed, for example: Definition and design contexts: Data that does not conform to these rules will negatively affect business process execution.

Therefore, data validation should start with business process definition and set of business rules within this process.

Rules can be collected through the requirements capture exercise.

In evaluating the basics of data validation, generalizations can be made regarding the different types of validation, according to the scope, complexity, and purpose of the various validation operations to be carried out.

For example: Data type validation is customarily carried out on one or more simple data fields.

The simplest kind of data type validation verifies that the individual characters provided through user input are consistent with the expected characters of one or more known primitive data types; as defined in a programming language or data storage and retrieval mechanism.

For example, many database systems allow the specification of the following primitive data types: 1) integer; 2) float (decimal); or 3) string.

Similarly, telephone numbers are routinely expected to include the digits and possibly the characters (plus, minus, and parentheses).

A more sophisticated data validation routine would check to see the user had entered a valid country code, i.e., that the number of digits entered matched the convention for the country or area specified.

A validation process involves two distinct steps: (a) Validation Check and (b) Post-Check action.

Tags: , ,