@Documented @Repeatable(value: UnLoCodeFormatConstraintList) @Target(value: [FIELD, METHOD, PARAMETER, TYPE_USE, ANNOTATION_TYPE]) @Retention(value: RUNTIME) @jakarta.validation.Constraint(validatedBy: []) @interface UnLoCodeFormatConstraint
The annotated element must be well-formed UN/LOCODE string.
Accepts onlyString
types. Message interpolation key is org.klokwrk.lib.lo.validation.constraint.UnLoCodeFormatConstraint.message
.
Useful reference: https://service.unece.org/trade/locode/Service/LocodeColumn.htm - Section "1.2 Column LOCODE".
The two first digits indicates the country in which the place is located. The values used concur with the ISO 3166 alpha-2 Country Code. In cases where no ISO 3166 country code element is
available, e.g. installations in international waters or international cooperation zones, the code element "XZ" will be used.
Next part contains a 3-character code for the location. The 3-character code element for the location will normally comprise three letters. However, where all permutations available for a
country have been exhausted, the numerals 2-9 may also be used.