paraguay-validators
v1.0.12
Published
Validator for Paraguay documents, phones, plates, postal codes
Downloads
117
Maintainers
Readme
paraguay-validators
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.