Super lightweight address verification courtesy of Lob.
$ npm install --save verify-address
var verify = require('address-verify')
verify({
address_line1: '255 King St',
address_line2: '414',
address_city: 'San Francisco',
address_state: 'CA',
address_zip: '94107',
address_country: 'US'
}, console.log)
// => { valid: true, address: {...}}
Required
Type: object
The address to verify
- address_line1: optional
- address_line2: optional
- address_city: optional
- address_state:optional
- address_zip: optional
- address_country: optional (2 letter country short-name code (ISO 3316))
Required
Type: function
Arguments: err, response
The response
contains:
Type: boolean
Whether the address is valid or not
Type: object
Validated address object if address is found
Type: string
Details if only a partial match is found and more information is needed