1.0.1 • Published 2 months ago

valitalor v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

valitalor

Italian localized validation library. Since the package is localized, by choice some of the code and documentation are also localized.

Installation

You can install this package via npm.

npm i valitalor

Package check

Just to check the success of the installation, also returns basic package information.

ParamTypeMandatoryDescription
No parameters are required
const valita = require('valitalor');
console.log(valita.itWorks());

#output : { json } > {
#    "itWorks": "Yes, it works!",
#    "package": "valitalor",
#    "version": "1.0.3"
#}

Usage

isCodiceFiscale

Validation of the "Codice Fiscale" (individual TAX code) including verification of the control character.

ParamTypeMandatoryDescription
codicefiscalestringtrueCodice Fiscale
const valita = require('valitalor');
console.log(valita.isCodiceFiscale('<codicefiscale>'));

#output : bool > true | false

isIBAN

Formal validation of the IBAN bank account code.

ParamTypeMandatoryDescription
IBANstringtrueIBAN
const valita = require('valitalor');
console.log(valita.isIBAN('<IBAN>'));

#output : bool > true | false

isPartitaIVA

Validation of the "Partita IVA" (VAT code) including verification of the control number.

ParamTypeMandatoryDescription
partitIVAstringtrue"Partita IVA" (VAT code)
const valita = require('valitalor');
console.log(valita.isPartitaIVA('<partitIVA>'));

#output : bool > true | false

isTargaAuto

Formal validation of the car license plate number.

ParamTypeMandatoryDescription
targastringtrueCar license plate number
const valita = require('valitalor');
console.log(valita.isTargaAuto('<targa>'));

#output : bool > true | false

isTargaMoto

Formal validation of the motorcycle license plate number.

ParamTypeMandatoryDescription
targastringtrueMotorcycle license plate number
const valita = require('valitalor');
console.log(valita.isTargaMoto('<codicefiscale>'));

#output : bool > true | false

License

MIT

1.0.1

2 months ago

1.0.0

2 months ago