teach-ict.com logo

THE education site for computer science and ICT

2. Validation

One way of reducing errors is to prevent invalid data being entered into a field. For example trying to load a non-existent date such as the 32nd of July into a date field.

This is the role of data validation.

Validation is the process of checking input data against a set of validation rules.

Validation aims to make sure that data is sensible, reasonable, complete and within acceptable boundaries.

It is important that you remember this description, students regularly say in exam answers that ‘validation checks that the data is correct’. This is NOT the right answer.

If you enter ‘Smithe’ instead of ‘Smith’ the only way to spot that error with validation is if Smithe was not meeting some kind of built-in 'accepted surname' rule.

So while validation can help reduce the number of errors when entering data, it cannot stop them entirely as there is data that is valid but incorrect.

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: Database Validation