aadhaar-validator

1.1.0 • Public • Published

aadhaar-validator

Build Status

NPM Downloads

This library checks whether a given number is valid Aadhaar number or Aadhaar Virtual ID, following the structure which is given by Government of India.

This is not Aadhaar check. This library computes whether a given number confirms criteria specified by UIDAI. The aadhaar number validated by this library, may or may not have been issued to real person as theoritically 8000 Crore (80 Billion) UIDs are possible where as Indian population is little over 100 Crores(1 Billion).

References:

Installation

npm install aadhaar-validator

Use

var validator = require('aadhaar-validator')
validator.isValidNumber('123412341234')
//returns false
validator.isValidNumber('123412341235')
//returns false
validator.isValidNumber('234123412346')
//returns true
 
//VID Tests
validator.isValidVID('2345234523436129')
//returns true
validator.isValidVID('2345234523436123')
//returns false
validator.isValidVID('2345234523436')
//returns false

Test

npm test

Readme

Keywords

Package Sidebar

Install

npm i aadhaar-validator

Weekly Downloads

4,681

Version

1.1.0

License

MIT

Unpacked Size

5.74 kB

Total Files

5

Last publish

Collaborators

  • dinsaw