if a contact record in a payroll database is classified as "former employee" then it must not have any associated salary payments after the separation date (cardinality = 0). Check digits Used for numerical data. To support error detection, an extra digit is added to a number which is calculated from the other digits. Consistency checks Checks fields to ensure data in these fields correspond, e.g., if expiration date is in the past then status is not "active". Cross-system consistency checks Compares data in different systems to ensure it is consistent. Systems may represent the same data differently, in which case comparison requires transformation (e.g., one system may store customer name in a single Name field as 'Doe, John Q', while another uses First_Name 'John' and Last_Name 'Doe' and Middle_Name 'Quality'). Data type checks Checks input conformance with typed data. For example, an input box accepting numeric data may reject the letter 'O'. File existence check Checks that a file with a specified name exists. This check is essential for programs that use file handling. Format check Checks that the data is in a specified format (template), e.g., dates have to be in the format YYYY-MM-DD. Regular expressions may be used for this kind of validation. Presence check Checks that data is present, e.g., customers may be required to have an email address. Range check Checks that the data is within a specified range of values, e.g., a probability must be between 0 and 1. Referential integrity Values in two relational database tables can be linked through foreign key and primary key. If values in the foreign key field are not constrained by internal mechanisms, then they should be validated to ensure that the referencing table always refers to a row in the referenced table. Spelling and grammar check Looks for spelling and grammatical errors. Uniqueness check Checks that each value is unique. This can be applied to several fields (i.e. Address, First Name, Last Name). Table look up check A table look up check compares data to a collection of allowed values. Post-validation actions Enforcement Action Enforcement action typically rejects the data entry request and requires the input actor to make a change that brings the data into compliance. This is most suitable for interactive use, where a real person is sitting on the computer and making entry. It also works well for batch upload, where a file input