validatorjs / validator.js

String validation
MIT License
23.12k stars 2.31k forks source link

Add a new identity card validator for the Indian PAN card #2030

Open Akshat-Mishra101 opened 2 years ago

Akshat-Mishra101 commented 2 years ago

I'd like to contribute to this project by adding a new identification, for the PAN card.

What's a PAN Card?

According to the official website, PAN is a ten-digit unique alphanumeric number issued by the Income Tax Department.

The rules for which, can again be found here

braaar commented 2 years ago

Could this be a fit for isTaxID(str, locale)?

Check if the given value is a valid Tax Identification Number. Default locale is en-US. More info about exact TIN support can be found in src/lib/isTaxID.js Supported locales: [ 'bg-BG', 'cs-CZ', 'de-AT', 'de-DE', 'dk-DK', 'el-CY', 'el-GR', 'en-CA', 'en-GB', 'en-IE', 'en-US', 'es-ES', 'et-EE', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-FR', 'fr-LU', 'hr-HR', 'hu-HU', 'it-IT', 'lb-LU', 'lt-LT', 'lv-LV' 'mt-MT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ro-RO', 'sk-SK', 'sl-SI', 'sv-SE' ]

Akshat-Mishra101 commented 2 years ago

It could surely be, since PAN is a form of tax id

Santhosh-Kumar-99 commented 1 year ago

Hi @Akshat-Mishra101 since we have two TIN (GSTIN and PAN) in India can we make the locale en-IN-GSTIN and en-IN-PAN respectively.

Santhosh-Kumar-99 commented 1 year ago

Hey @braaar and @pano9000 I could see an open PR for this, which is in review for a long time. Should I proceed to raise a new PR with my code changes?

Santhosh-Kumar-99 commented 1 year ago

Opened PR for this issue. PR Id - #2153