1.1.0 • Published 5 years ago

aadhaar-validator v1.1.0

Weekly downloads
92
License
MIT
Repository
github
Last release
5 years ago

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
1.1.0

5 years ago

1.0.5

7 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago