ssn-validate
v2.0.2
Published
Hey, I Made This SSN Validator To Validate SSN I Also Have SSN Generator You Can Look At This - https://www.npmjs.com/package/ssn-generator
Downloads
3
Readme
SSN Validator
Hey This Package Is Made For Validating SSN I Validate These SSN From An Website And I Scrape It
I Already Have A SSN Generator You Can Look At That - https://www.npmjs.com/package/ssn-generator
First You Have To Install The Package Using
npm i ssn-validate
Note: This Is An Async function you can use await with it you can require it using
const ssn_validator = require("ssn-validate")
Note: SSN Format Should Be Like This 123-45-6789
Then you can run this using - The Format Of SSN should be like this
ssn_validator("123-45-6789")
You Can Use Async Await With This In For Example I Am Using IIFE Here
(
async() => {
await ssn_validator("123-45-6789")
}
)()
These SSN I Have Shown Here Is Invalid SSN
You Should Expect 4 Outputs Here
On Valid SSN
{
"isValid":true
}
This Will Return as A JSON Format
On Invalid SSN
{
"isValid":false
}
This Will Return as A JSON Format
On Error While Validating SSN
"An Unknown Error Ocurred"
This Will Return A JSON Format - NOTE: I Used JSON.stringify("An Unknown Error Ocurred")
On Invalid Format
"Invalid Format"
This Will Return A JSON Format - NOTE: I Used JSON.stringify("Invalid Format")