This package purpose is to provide a simple solution for a form validation where the user must insert his Italian Fiscal code
npm install cf-it-validatorThis package purpose is to provide a simple solution for a form validation where the user must insert his Italian Fiscal code
run npm i cf-it-validator inside your project
Just import the package where you need and use the validation function:
``js
import {validateITCF} from 'cf-it-validator'
const isValid = validateITCF(fiscal_code, {name, lastname, birthdate /use this formats: DD/MM/YY or DD/MM/YYYY/, municipe})
``
for municipes the list is taken here
everything is calculated in lowercase, so no need to worry about case sensitiveness
You can check just a part of the fiscal code, for example if in the object you pass only the name and the lastname the library will check only the first six characters