1. Validity Check
Definition:
A validity check ensures that the data entered is correct and acceptable according to predefined rules, formats, or constraints.
Purpose:
Examples:
-
A date field should be in the format DD/MM/YYYY.
-
Age should be a number between 0 and 120.
-
Email addresses must contain @ and a domain.
Key Point:
2. Consistency Check
Definition:
A consistency check ensures that related pieces of data do not conflict with each other.
Purpose:
Examples:
-
Start date of a project should not be after the end date.
-
Total of individual line items should equal the invoice total.
-
If a user is marked as "married," marital status details must be present.
Key Point:
3. Key Differences Table
| Feature |
Validity Check |
Consistency Check |
| Purpose |
Ensures data is correct and acceptable |
Ensures data is logically coherent with other data |
| Focus |
Single data item |
Multiple related data items |
| Example |
Age is between 0-120 |
Start date ≤ End date |
| When Used |
During data entry |
During data processing or validation of related fields |
Summary
Validity check = Is the data acceptable?
Consistency check = Does the data make sense together?