Closed Akshat-Mishra101 closed 2 years ago
I would suggest implementing this as a locale in isIdentityCard(str [, locale])
Sure, just one doubt though. Since we already have a locale for the indian region identity (which is not the same as adhaar) how would we include this new identity? or what locale would we choose?
I think adding it as a separate "locale" (not stricly a real locale, but I suppose it's justified when multiple standards exist within the same locale) is the cleanest option. IN-2
, IN-2016
, IN-UIDAI
, IN-aadhaar
perhaps?
I just looked into it, and according to the PR where it was added, the existing identity card validator in the IN
locale is for aadhaar.
Take a look at the test cases to see what it validates: https://github.com/validatorjs/validator.js/blob/86a07ba4f3f710f639e92a62cf81dd3321ef9ee8/test/validators.js#L5222-L5235
Thanks braaar, this seems it; I'll close this issue. There are a couple of more identifications I'd like to add to this, which I'll open in the next few issues :)
Hey guys, I need permission to add a validator for a popular Indian identity card, called the "Adhaar Card"
What is an Adhaar Number?
According to UIDAI -- Aadhaar number is a 12-digit random number issued by the UIDAI (“Authority”) to the residents of India after satisfying the verification process laid down by the Authority. Any individual, irrespective of age and gender, who is a resident of India, may voluntarily enrol to obtain Aadhaar number.
The rules for an adhaar number are as follows