Validates the data integrity. It assumes that the check digit is appended at end of the data.
data
bool validate(String? data);