0.0.24 • Published 9 months ago

@randock/license-plate-validator v0.0.24

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

License Plate Validator

This package provides validators for the following countries:

  • NL
  • BE
  • DE
  • AT
  • FR
  • LU
  • CZ
  • CH
  • IT
  • PL
  • UA

The easiest way to use the package is as follows.

import { ValidatorFactory } from '@randock/license-plate-validator';

// obtain a validator instance
const validator = ValidatorFactory.forCountry('NL');

// validate license plate
const valid: boolean = validator.validate('XX-YY-ZZ'); // true

// format license plate (result is a string array)
const formats: string[] = validator.format('11YYZZ'); // ["11-YY-ZZ"]

For some countries, the format cannot be deduced to only one possible format. For example, the German license plate "DES123" can either be DE S 123 (Dessau) or D ES 123 (Düsseldorf). That is why the result of the format method is always an array of strings.

0.0.24

9 months ago

0.0.23

1 year ago

0.0.20

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.14

2 years ago

0.0.15

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago