Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

postcoder-contact-validation

1.0.0 • Public • Published

Postcoder contact validation

Simple node wrapper for email and mobile validation endpoints of the PostCoder Web API from Allies.

Find out more about the email validation API
Find out more about the mobile validation API

Sign up for a trial to get an API key

Note: This is a paid for API

For full developer documentation

Install

npm install postcoder-contact-validation

https://www.npmjs.com/package/postcoder-contact-validation

Basic email validation usage

var contactValidation = require("postcoder-contact-validation");
 
contactValidation.init("[YOUR API KEY HERE]");
 
contactValidation.validateEmail("test@domain.com", function(result, error) {
 
    if (error) {
        console.log(error);
    } else {
        // returns an object with a Boolean property "valid" along with additional information
        console.log(result);
    }
 
});

Full list of response fields for email validation

Basic mobile validation usage

var contactValidation = require("postcoder-contact-validation");
 
contactValidation.init("[YOUR API KEY HERE]");
 
contactValidation.validateMobile("+447700900722", function(result, error) {
 
    if (error) {
        console.log(error);
    } else {
        // returns an object with a Boolean property "valid" along with additional information
        console.log(result);
    }
 
});

Full list of response fields for mobile validation

Check status of your API key

Returns an object with information about number of credits on your account and more

Full list of fields returned

var address_lookup = require("postcoder-geocoding");
 
address_lookup.init("[YOUR API KEY HERE]");
 
address_lookup.checkStatus(function(result, error) {
 
    if (error) {
        console.log(error);
    } else {
        // returns an object with information about number of credits on your account and more
        console.log(result);
    }
 
});

Note about support

This is a community supported package, maintained by Stephen Keable

Keywords

none

install

npm i postcoder-contact-validation

Downloadsweekly downloads

4

version

1.0.0

license

ISC

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability