Socket
Book a DemoInstallSign in
Socket

node-id-number-validator

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-id-number-validator

JavaScript ID Number Validator for NodeJS

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

Deprecated!!!

Please use id-number.

ID Number Validator for Node

Introduction

This is a collection of validators of identity document number for JavaScript applications.

Usage

Step 1, install.

npm i node-id-number-validator

Step 2, get a validator.

const IDValidators = require('node-id-number-validator');
const validator = IDValidators.getValidator('SG', 'NRIC');

Step 3, validate an input.

const result = validator('S0980292D');

And the result is in format:

{
    'result': true or false,
    'reason': string if the result is false
}

Available Validators

CountryDocument
SG (Singapore)NRIC

FAQs

Package last updated on 26 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts