SSN¶
The validation should only be executed for identified numbers.
The return string is called Normbyte and is two characters long. The Normbyte is there to encode validation and classification results.
Original PDF:
SSN.pdf (SN 01001)
Identification¶
1 | 2 | 3 |
---|---|---|
A | N | N |
A | * or . | x |
BDNU | N |
Validation¶
RegEx (https://regex101.com/r/thQshK/1/)
^[A-HJ-NP-Z][\*.\d]{1,5}(?>[A-HJ-NP-Z\+][\*\d]{0,4})?(?>[A-HJ-NP-Z\+][\*\d]{0,3})?(?>[A-HJ-NP-Z\+\*\d.]{1,6})?$
Block 1¶
Must always be provided; see also Section 3.2 Minimum Assignment
- Assignment
- DS 1 (identification): letters according to SN 01004, not the special plus (
+
) character
DS 2 to 6: numbers and special star (*
) character - Zeros located between DS 1 (letter) and the following numbers (leading zeros or filler digits) are not written. 1)
Block 2¶
- A Block 2, if not needed, may only be omitted if no other block follows
- Block 2, if not needed, between two blocks is to be replaced by the letter X (filler letter) in DS7
- Assignment
DS 7: all letters with the exception ofI
andO
, special plus (+
) character
DS 8 to 11: digits and the special star (*
) character
Leading zeros between DS 7 (letter) and subsequent digits (leading zeros or filler zeros) are not written. 1)
Block 3¶
- A Block 3 that is not needed may only be omitted if no other block follows
- A Block 3 that is not needed between two blocks is to be replaced by the letter
X
(filler letter) in D S7 - Assignment:
DS 7: all letters with the exception ofI
andO
, special plus (+
) character
DS 8 to 11: digits and special star (*
) character - Leading zeros between DS7 (letter) and subsequent digits (leading zeros or filler zeros) are not written.1)
Block 4¶
- A Block 4 that is not needed may only be omitted if no other block follows
- A Block 4 that is not needed between two blocks is to be replaced by the letter
X
(filler letter) in DS17 - Assignment
See alsoSN 01012
Block 5¶
- A Block 5 that is not needed is omitted
- Assignment
See alsoSN 01021
Classification¶
As a requesting service, I want to get information about the state of the number if it is validated as correct, that I have more details about the product number.
The classification should only be executed for valid numbers.
The return string is called Normbyte and is max. two characters long. The Normbyte is there to encode validation and classification results.
NB | Description |
---|---|
S | Standard code number |
S* | Code number with special characters: + and/or * |
SM | Standard code number with identifier M (beginning with M) |
SA | M number with special characters + and/or * |