Описание тега validationrules

A validation rule is a criterion used in the process of data validation, after the data has been encoded onto an input medium. This is distinct from formal verification, where the operation of a program is determined to be correct per the specification.

A validation rule is a criterion used in the process of data validation, after the data has been encoded onto an input medium. This is distinct from formal verification, where the operation of a program is determined to be correct per the specification.

An example of a validation check is the procedure used to verify an ISBN:

  1. Size. The number of characters in a data item value is checked; for example, an ISBN must consist of 10 characters only (in the previous version – the standard for 1997 and later has been changed to 13 characters).

  2. Format checks. Data must conform to a specified format. Thus, the first 9 characters must be the digits 0 through 9, and the 10th must be either one of those digits or an X.

  3. Consistency. Codes in the data items which are related in some way can thus be checked for the consistency of their relationship. The first number of the ISBN designates the language of publication. for example, books published in French-speaking countries carry the digit "2". This must match the address of the publisher, as given elsewhere in the record.

  4. Range. Does not apply to ISBN, but typically data must lie within maximum and minimum preset values. For example, customer account numbers may be restricted within the values 10000 to 20000, if this is the arbitrary range of the numbers used for the system.

  5. Check digit. An extra digit calculated on, for example, an account number, can be used as a self-checking device. When the number is input to the computer, the validation program carries out a calculation similar to that used to generate the check digit originally and thus checks its validity. This kind of check will highlight transcription errors where two or more digits have been transposed or put in the wrong order. The 10th character of the 10-character ISBN is the check digit.

Source: Wikipedia