Data Element Validator
Checks each field of a card record against the format rules in ISO/IEC 7812 and 7813. Every element has a defined length, character set and representation, and this tool checks them one at a time.
How this tool works
The data elements of a card record are defined in ISO/IEC 7812, and each one has a fixed length, a permitted value range and a purpose. Validating a record means checking the primary account number against its brand's length rule, the expiry against a valid month and a plausible year, the service code against the permitted values, and the discretionary data against its own length limit.
The service code is the part that is most often wrong and least often checked. It is two digits governing interchange and three governing authorisation, and it determines what the card may be used for. A record whose service code forbids cash withdrawal is a legitimate record that should be refused in a cash context, and reading it is how you find that out.
Service code values
| Value | Meaning |
|---|---|
| 00 | International interchange, normal use, PIN required |
| 01 | International interchange, normal use, no PIN required |
| 02 | International interchange, goods and services only |
| 20 | International interchange, restricted use, PIN required |
| 24 | International interchange, cash only, PIN required |
| 30 | National interchange only, PIN required |
The second digit governs interchange and the last three govern authorisation, and they are read together.
When to use it
- Validate a card record field by field against the standard
- Read a service code and confirm what the card may be used for
- Find which field of a record is malformed
- Check a record before passing it to a terminal emulator
Frequently asked questions
What is a data element validator?
A tool that checks each field of a card record against the ISO/IEC 7812 rules: the number against its brand's length rule, the expiry against a valid month and year, the service code against its permitted values, and the discretionary data against its length limit.
What is the service code?
Five digits on a card record: two governing interchange and three governing authorisation. They determine what the card may be used for, so a card with a cash-only service code should be refused in other contexts.
What is the discretionary data?
Data on the record after the service code, whose length and content the issuer chooses. It may carry a PIN block and a track 3 block, and it is where the most variation between issuers sits.
What is the maximum discretionary data length?
It depends on the track and the format. Track 2 allows a PIN block and a track 3 discretionary block, and the total record length is capped at the track's maximum.
Does a valid record mean the card works?
No. It means every field is well formed. Whether the account exists, is active or has funds is known only to the issuer.