Detailed Description of Validate Id Card

This step checks validity of a card number specified in the cn data input. In case the card number satisfies the conditions of validity, the input card number will be copied to the data output cnOut. If the card number fails to satisfy some of the conditions, the corresponding error flags will be set (see description of the flags) and the output will contain an empty value. Recording of an invalid number to the output can be enforced by the parameter omitInvalidCN and setting its value to false.

Validation procedure: first, the characters '0' are removed from the beginning of card number (from the left). The remaining number has to satisfy the following conditions of validity (to be recognized as valid):

The last digit of the card number is a check digit. The algorithm used to validate the check digit is called the Luhn algorithm. When validated, the number may be padded with zeroes from the left without affecting the check digit value.

This step outputs standardized number formats, i. e. without added initial zeros.


Top of page

Example: Example
<step id='alg' className='cz.adastra.cif.tasks.clean.ValidateIdCardAlgorithm'>
        <properties>
                <cn>cn</cn>
                <cnOut>cn_out</cnOut>
                <omitInvalidIC>false</omitInvalidIC>
                <scorer explanationColumn='expl'>
                        <scoringEntries>
                                <scoringEntry key='VIC_NULL' score='1' explain='true' />
                                <scoringEntry key='VIC_BAD_FORMAT' score='2' explain='true' />
                                <scoringEntry key='VIC_INVALID' score='4' explain='true' />
                                <scoringEntry key='VIC_INVALID_CHECK' score='5' explain='true' />
                                <scoringEntry key='VIC_EMPTY_ISSUER' score='6' explain='true' />
                        </scoringEntries>
                </scorer>
        </properties>
</step>

iWay Software