Skip to content

🇿🇦 Perform regex and checksum match to check if given number string is a valid South African ID

License

Notifications You must be signed in to change notification settings

tiaanduplessis/valid-south-african-id

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

valid-south-african-id

package version package downloads standard-readme compliant package license make a pull request

🇿🇦 Perform regex and checksum match to check if given number string is a valid South African ID

Table of Contents

Install

Install the package locally within you project folder with your package manager:

With npm:

npm install valid-south-african-id

With yarn:

yarn add valid-south-african-id

With pnpm:

pnpm add valid-south-african-id

Usage

const validSouthAfricanId = require('valid-south-african-id')
console.log(validSouthAfricanId('yourIdNumber')) // true || false

CLI

$ npm install --global valid-south-african-id
# OR
$ yarn global add valid-south-african-id

Then:

$ valid-sa-id 9202204720082
# false

Contributing

Got an idea for a new feature? Found a bug? Contributions are welcome! Please open up an issue or make a pull request.

License

MIT © Tiaan du Plessis

About

🇿🇦 Perform regex and checksum match to check if given number string is a valid South African ID

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •