@make-sense/adhaar-validator
v1.0.3
Published
It is typescript enchanced version of Adhaar-validator library
Downloads
25
Readme
@make-sense/adhaar-validator
It is typescript enchanced version of Adhaar-validator library
This library checks whether a given number is valid Aadhaar number or Adhaar Virtual ID, following the structure which is given by Government of India.
This library can only be used to validate the format of adhaar card number. It strictly doesnt check for authenticity of Adhaar cards.
References:
- https://www.npci.org.in/sites/default/files/circular/Circular_No_9.pdf
- Verhoeff Algorithm
- Aadhaar VID Circular
- UID Numbering Scheme
Install
npm install @make-sense/adhaar-validator
Use
import { isValid, isValidVID } from "@make-sense/adhaar-validator";
// or
// const { isValid, isValidVID } = require("@make-sense/adhaar-validator");
isValidNumber("123412341234");
// false
isValidNumber("123412341235");
// false
isValidNumber("234123412346");
// true
// Virtual ID Tests
isValidVID("2345234523436129");
// true
isValidVID("2345234523436123");
// false
isValidVID("2345234523436");
// false