Introduction

Data Validation

  • Process of which the data entered is **sensible **and reasonable
TypeMethodExample
Range CheckCheck that data is within given rangeTest score must be between 0 and 100
Format CheckCheck that data is in the right formatDate must be in the format dd/mm/yyyy
Length CheckCheck that data length is correctLength of password must be more than 6 characters
Presence CheckCheck that data existsUsername cannot be blank
Digit CheckCheck for validity of dataNRIC must be valid

Data Verification

  • Process of which to **ensure **the input data **matches **the original resource
  • The user may still make a mistake when inputting data
  • For example, we are often asked to enter the password twice to change it