Validates Bangladeshi cell phone numbers.
- Install from
npm:
npm install bd-cellnum-validatorconst 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);- Clone the repository from github
- Then open your favorite command shell inside the directory and run :
npm run testisValidfunction takes the cell number asStringas its param.- returns
trueif the cell number is valid andfalseotherwise.
MIT
