With npm
:
npm install identity-number-validator
or with yarn
:
yarn add identity-number-validator
import identityNumberValidator from "identity-number-validator"
// should return true as this is a valid identity number
console.log(identityNumberValidator("0922553508", "EC"))
// should return false as this is an invalid identity number
console.log(identityNumberValidator("123456789", "EC"))
Country | Code |
---|---|
Ecuador | EC |