1.0.12 • Published 4 years ago

paraguay-validators v1.0.12

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

paraguay-validators

npm version Build Status

Paraguay RUC number and Car Plate validators / Validaciones de numero RUC y Placa de vehículo.

Instalation

With npm

npm i paraguay-validators

Running tests

npm run test

Validations

RUC

Generic RUC validator for Individual Person and Company.

const { ParaguayValidators } = require('paraguay-validators');
const validator = new ParaguayValidators();

const isValid = validator.RUC.validateRUC('564823570'); // For Companies and Natural Persons
const companyIsValid = validator.RUC.validateCompanyRUC('564823570'); // Only for Companies
const personIsValid = validator.RUC.validateIndividualRUC('64823571'); // Only for Natural Persons

Car Plates

Vehicle Plate validator for new Mercosul Plates of Paraguay and old car plates format of Paraguay.

const { ParaguayValidators } = require('paraguay-validators');
const validator = new ParaguayValidators();

const isValid = validator.Plate.validate('ABC123'); // For old and new formats
const oldIsValid = validator.Plate.validateOldPlate('ABC123'); // Only old format.
const carIsValid = validator.Plate.validateCarPlate('ABCD123'); // Only new Car Mercosul format of Paraguay.
const motoValid = validator.Plate.validateMotorcyclePlate('123ABCD'); // Only new Motorcyle Mercosul format of Paraguay.

On Browser

Script Reference

<script src="node_modules/paraguay-validators/paraguay-validators.min.js"></script>

Validations

var validator = new ParaguayValidators();
var rucIsValid = validator.RUC.validateRUC('564823570'); // For Companies and Natural Persons
var companyRucIsValid = validator.RUC.validateCompanyRUC('564823570'); // Only for Companies
var personRucIsValid = validator.RUC.validateIndividualRUC('64823571'); // Only for Natural Persons

var plateIsValid = validator.Plate.validate('ABC123'); // For old and new formats
var oldPlateIsValid = validator.Plate.validateOldPlate('ABC123'); // Only old format.
var carPlateIsValid = validator.Plate.validateCarPlate('ABCD123'); // Only new Car Mercosul format of Paraguay.
var motoPlateValid = validator.Plate.validateMotorcyclePlate('123ABCD'); // Only new Motorcyle Mercosul format of Paraguay.
1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago