dinsaw / aadhaar-validator

Validates Aadhaar Number, Aadhaar VID
23 stars 9 forks source link

Validator is not working for 16 digits VID #2

Closed mkumar028 closed 5 years ago

mkumar028 commented 5 years ago

First of all, thanks for this library.

I have been facing an issue while using the same library for validating Aadhaar virtual ID (VID).

When I am going through the codebase, found that we are making any number greater than 12 as invalid aadhaar number.

Can you make changes to work for both Aadhaar-number and VID.

dinsaw commented 5 years ago

Hi @mkumar028,

According to UIDAI VID description

VID is a temporary, revocable 16-digit random number mapped with the Aadhaar number.

As per definition, VID is random 16-digit number. It does not follow any pattern. Do you want this library to check whether given number contains 16 digits?

mkumar028 commented 5 years ago

Hi @dinsaw. yeah, it's a random number and it is revocable. But that 16 digit number also follows the same pattern as Aadhaar number. So I feel like it's better to handle for 16 digit number check also, instead of throwing errors for a number greater than 12. If I am wrong, pls feel free to correct me.

dinsaw commented 5 years ago

But that 16 digit number also follows the same pattern as Aadhaar number.

@mkumar028 I did not find any documentation on this. Can you please provide any official documentation?

srikanthlogic commented 5 years ago

https://uidai.gov.in/images/resource/UIDAI_Circular_11012018.pdf

Refer 5b of the announcement

dinsaw commented 5 years ago

@mkumar028 Please use latest version v1.1.0