chilean-plate-validator
v0.8.0
Published
Simple chilean plate validator
Downloads
50
Maintainers
Readme
chilean-plate-validator
Description
This module will help you to verify if a chilean registration plate is valid (doesn't calculate the check digit).
The RegExes built in, follow the chilean civil registration specifications.
«Instructivo para Validación de Patentes - Servicio de Registro Civil e Identificación»
Code Example
Example 1:
import { plateValid } from 'chilean-plate-validator';
plateValid('BBCC12'); // returns true
plateType('BBCC12'); // returns 'NEW_VEHICLE_PLATE'
Example 2:
import { CLPlate } from 'chilean-plate-validator';
const plate = new CLPlate('BBCC12');
plate.valid // returns true
plate.type // returns 'NEW_VEHICLE_PLATE'
Installation
$ npm i chilean-plate-validator --save
License
Author
- GitHub: Gabo2151
- Twitter: gabriel_galilea