- Notifications
You must be signed in to change notification settings - Fork2
Validation API for the french NIR
NotificationsYou must be signed in to change notification settings
betagouv/nir_validate
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Validation des numéros de sécurité sociale, basé sur ladéfinition wikipedia
Parse and validate the french NIR, based on thewikipedia definition.
$ npm install nir_validate
constvalidate=require('nir_validate');validate('255081416802538');// => truevalidate('255081416802539');// => falsevalidate('2 55 08 14 168 025 38');// => true
- shouldClean - set this to
false
to become white-space and case sensitive
validate('2 55 08 14 168 025 38',{shoudlClean:false});// => false