node-validate-india
Module to validate and retrieve Indian mobile numbers, Aadhaar, PAN, GST, etc.
Installation
npm install validate-india --save
Validations
Below are the list of currently supported documents:
- Aadhaar
- Mobile Number
- PAN
- GST
- Bank IFSC
- ESIC
- UAN
Retrieval
Below are the list of current supported documents from which data can be retrieved from an image:
- Aadhaar
- PAN
Data from image is extracted using the Google's Vision API, hence, to use this feature you must have a Google Developers account and the environment variable GOOGLE_APPLICATION_CREDENTIALS should be set to point to the file path of the JSON file that contains your service account key. For more details refer the link: Google Documentation
Usage
Javascript
Below is an example of simple validation
var pan = pan; if pan console; else console;
Below is an example of retrieval of PAN number using OCR
var pan = pan; pan;
Typescript
Below is an example of simple validation
; f pan.isValid'BMEQ0056N' else
Below is an example of retrieval of PAN number using OCR
; const value = await pan;console;
To-Do List
- Extract Full Name, Father's Name and Date of Birth from PAN using OCR.
- Extract Full Name, Date of Birth and Gender from Aadhaar Image using OCR.