Detailed Description of Validate RZ

This step checks the validity of a vehicle registration number (formerly known as SPZ in Czech Republic). If the vehicle registration number is determined to be invalid, the step attempts to identify possible typing errors and, if successful, returns the corrected number. While correcting, the step attempts to switch the following pairs of characters: 'O' <-> '0', 'S' <-> '5', 'Z' <-> '2' and 'I' <-> '1'.

Note the following change in the step behavior: the step for now does not contain any internal cleaning mechanism (removing invalid characters) - and expects cleansed data on input. In this case, cleaning means removing special characters (pause, spaces, etc.) and character conversion to uppercase form.

First, the step decides if it is the older SPZ or a new RZ. If it is a RZ, the step checks if it is a special or standard type of vehicle registration number. During verification of the RZ number the step works with several groups of characters enumerated below. The usertm)s patterns, which are used in verification of standard types of RZ numbers, are constructed from such groups of characters. See the parameter rzPatterns for more information.

Defined groups of characters are as follows:

The user's pattern can also contain the exact character enclosed in apostrophes such as 'X', where X is any letter of an alphabet.

For standard RZ values, the following parameters are checked:

  1. a minimum of 5, and a maximum of 7, characters
  2. characters are formed by Latin alphabets capitals and Arabic digits
  3. the first character must be a letter of the region: R
  4. the next characters can be alphanumeric characters: X
  5. matching with some of the defined rzPatterns, see the attribute rzPaterns

The step recognizes vehicle registration numbers of the following types (Note: the quoted characters define specific letters in concrete positions):

The first step of the vehicle registration number verification process verifies the number matching against a special vehicle registration number (diplomatic, export etc.). If a special number is not found, the step continues verification of the vehicle registration number as a standard vehicle registration number. For example, it matches the vehicle registration number against rzPatterns, and if a match is not found, the vehicle registration number is verified according to the law (points 1. and 2. from the list above).

If the vehicle registration number is recognized as a RZ and has the properties vehicleType, prodYear defined, these values are verified against data found in the vehicle registration number. If it is a SPZ, the values vehicleType, and prodYear are not used for verification.


Top of page

Example: Example
<step id='alg' className='cz.adastra.cif.tasks.clean.ValidateRZAlgorithm'>
        <properties>
                <rz>rz</rz>
                <outRz>outRz</outRz>
                <vehicleType>vtype</vehicleType>
                <prodYear>year</prodYear>
                <rzPatterns>
                        <rzPattern>AAAAN</rzPattern>
                        <rzPattern>NNNNA</rzPattern>
                        <rzPattern>AAANN</rzPattern>
                </rzPatterns>
                <alphabet>ABCDEFG</alphabet>
                <omitInvalidRZ>true</omitInvalidRZ>
                <scorer explanationColumn='expl'>
                        <scoringEntries>
                                <scoringEntry key='RZ_NULL' score='1' explain='true' />
                                <scoringEntry key='RZ_UNKNOWN' score='2' explain='true' />
                                <scoringEntry key='RZ_BAD_FORMAT' score='4' explain='true' />
                                <scoringEntry key='RZ_SUSP' score='4' explain='true' />
                                <scoringEntry key='RZ_FIXED' score='8' explain='true' />
                                <scoringEntry key='RZ_BAD_TYPE' score='16' explain='true' />
                                <scoringEntry key='RZ_BAD_YEAR' score='32' explain='true' />
                                <scoringEntry key='RZ_TYPE_MISSING' score='64' explain='true' />
                                <scoringEntry key='RZ_YEAR_MISSING' score='100' explain='true' />
                        </scoringEntries>
                </scorer>
        </properties>
</step>

iWay Software