i have field containing data in this format:
LL-000-00
So any data inputted whoud look similar to this:
AA-123-45
To validate the data that he user inputs i whoud like to use the last two digits to check the first 2 sets of data.
for example:
Take 'AA' and get the ASCII code take the first digit from the code and compare it to the first validation number.
And add '123' and take the first digit to be compared to the last digit of the validation code.
Please help its for my a-level coursework.
Or if u can think of a better way to validate it tell me.
Thanks for reading this.
LL-000-00
So any data inputted whoud look similar to this:
AA-123-45
To validate the data that he user inputs i whoud like to use the last two digits to check the first 2 sets of data.
for example:
Take 'AA' and get the ASCII code take the first digit from the code and compare it to the first validation number.
And add '123' and take the first digit to be compared to the last digit of the validation code.
Please help its for my a-level coursework.
Or if u can think of a better way to validate it tell me.
Thanks for reading this.