No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
jquery.phone-validator-net.js
test.html
test.js

README.md

jquery-phone-validator-net

A small library providing a wrapper for api.phone-validator.net for jQuery

Installation

Download zip, extract and embed jquery.phone-validator-net.js to your HTML. This Plugin needs jQuery!

Usage

See test.js and test.html

// Init only once
$.validatePhone(APIKEY);

// OnClick
$("#submit").click(function () {
  $("#phone").validatePhone(function (response) {
    console.log(response);
  }, countryCodeIso2, mode, locale)
})

//response looks like that:
  /*
    status	VALID_CONFIRMED, VALID_UNCONFIRMED, INVALID or error: DELAYED, RATE_LIMIT_EXCEEDED, API_KEY_INVALID_OR_DEPLETED
    linetype	FIXED_LINE, MOBILE, VOIP, TOLL_FREE, PREMIUM_RATE, SHARED_COST, PERSONAL_NUMBER, PAGER, UAN, VOICEMAIL
    location	geographical location (city, county, state)
    countrycode	two letter ISO 3166-1 country code
    formatnational	phone number in national format
    formatinternational	phone number in international format
  */

});

Release History

  • 0.1.0 Initial release