0.0.23 • Published 4 months ago

@randock/license-plate-validator v0.0.23

Weekly downloads
-
License
MIT
Repository
-
Last release
4 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.23

4 months ago

0.0.20

9 months ago

0.0.21

8 months ago

0.0.22

8 months ago

0.0.14

10 months ago

0.0.15

10 months ago

0.0.16

10 months ago

0.0.17

9 months ago

0.0.18

9 months ago

0.0.19

9 months ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago