1.0.7 • Published 2 years ago

cf-it-validator v1.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

CF Italy validator

This package purpose is to provide a simple solution for a form validation where the user must insert his Italian Fiscal code

How to install

run npm i cf-it-validator inside your project

How to use

Just import the package where you need and use the validation function:

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

Other info

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

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago