bd-cellnum-validator
v5.3.0
Published
Validates Bangladeshi cellphone numbers.
Downloads
4
Readme
bd-cellnum-validator
Validates Bangladeshi cell phone numbers.
How to?
Installation
- Install from
npm
:
npm install bd-cellnum-validator
Usage Example
const validator = require('bd-cellnum-validator');
var cellNumber = '1212121'
// validator.isValid returns a boolean
// true - if the number is valid
// false - if not valid
var result = validator.isValid(cellNumber);
console.log(result);
Testing
- Clone the repository from github
- Then open your favorite command shell inside the directory and run :
npm run test
isValid function
isValid
function takes the cell number asString
as its param.- returns
true
if the cell number is valid andfalse
otherwise.
License
MIT