All Projects → dinsaw → aadhaar-validator

dinsaw / aadhaar-validator

Licence: other
Validates Aadhaar Number, Aadhaar VID

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to aadhaar-validator

smart-docs-parser
An OCR based document parser to extract information from identity document images
Stars: ✭ 14 (-30%)
Mutual labels:  aadhaar
aadhaarapi.net
Aadhaar API for .NET is a client library that provides an easy way to interact with the UIDAI Aadhaar services.
Stars: ✭ 31 (+55%)
Mutual labels:  aadhaar

aadhaar-validator

Build Status codecov 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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].