Package Exports
- validate-country-mobile
- validate-country-mobile/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (validate-country-mobile) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Description
npm package for validate country mobile.
Installation
`npm i validate-country-mobile --save`
let vcm = require('validate-country-mobile');
How to use
Let's see about js code:
let vcm = require('validate-country-mobile');
let _numberinfo=vcm.validatenumber("1","9876543210");
console.log(_numberinfo); // returns as follows
{
status: true,
info: {
code: 'CA',
label: 'Canada',
accepetedLength: [ 10 ],
countrycode: '1',
nationalnumber: '9876543210',
devicetype: 'UNKNOWN'
}
}
let _numberinfo=vcm.validatesinglenumber("+0019876543210");
console.log(_numberinfo); // returns as follows
{
status: true,
info: {
code: 'CA',
label: 'Canada',
accepetedLength: [ 10 ],
countrycode: '1',
nationalnumber: '9876543210',
devicetype: 'UNKNOWN'
}
}
let _countryinfo=vcm.getCountryInfo("1");
console.log(_countryinfo); // returns as follows
{
code: 'CA',
label: 'Canada',
maxlength: 10,
countrycode: '1'
}
let _countryinfo=vcm.getCountryInfoISO("US");
console.log(_countryinfo); // returns as follows
{
code: 'US',
label: 'United States',
maxlength: 10,
countrycode: '1'
}
I am most welcome to have your feedback on the number and updates if i am missing,
feel free to get in touch and update us the number so the respective changes get updated.
Support
Happy to add more, and need any updates, do get in touch on my telegram over @chigovera