personal-identity-validation
v1.0.0
Published
Personal Identity Validation Ex: National Id, Passport & Tax Id
Downloads
1
Maintainers
Readme
personal-identity-validation
Validate personal-identity-validation.
Note: This is a minimal version which has support for a short list of countries, more will be added soon.
Usable Function
isSupportedCountry(countryCode);
validateNationalIdNumber(countryCode, value);
validatePassportNumber(countryCode, value);
validateTaxIdNumber(countryCode, value);
Usage
import personalIdentityValidation from 'personal-identity-validation';
const nationalId = '1734312345478';
const isValidIdForJordan = personalIdentityValidation.validateNationalIdNumber('JOR', nationalId);
const isValidIdForIndonesia = personalIdentityValidation.validateNationalIdNumber('IND', nationalId);
const isValidForIsrael = personalIdentityValidation.validateNationalIdNumber('ISR', nationalId);
const isValidIdForPalestine = personalIdentityValidation.validateNationalIdNumber('PSE', nationalId);
const isValidIdForQatar = personalIdentityValidation.validateNationalIdNumber('QAT', nationalId);
const isValidIdForTurkiye = personalIdentityValidation.validateNationalIdNumber('TUR', nationalId);
Type of national IDs supported
JOR: 'Jordan'
ISR: 'Israel'
IND: 'Indonesia'
PSE: 'Palestine'
QAT: 'Qatar'
TUR: 'Türkiye'