LiveAddress API jQuery Plugin

Test Runner — by SmartyStreets

Revision: / Debug mode: jQuery version: / Plugin version:

Happy path

The simplest, most traditional kind of address form

Street address:
City:
State:
ZIP Code:

Street 2 Field

Traditional address form containing a street line 2 field

Street address:
Street line 2:
City:
State:
ZIP Code:

SLAP

Single-Line (freeform) Address Processing: the whole address contained in one field

Address:

Two SLAP addresses

One might be for shipping, the other might be for billing

Billing address:
Ship to:

Two addresses

Likely, one would be a billing address, and the other would probably be shipping

Street address:
City:
State:
ZIP Code:

Street address:
State:
ZIP Code:

Country field

Non-US addresses should be allowed to pass thru freely

Address:
City:
Province:
Postal Code:
Country:

Incomplete address

When there's not enough information to verify an address, the fields shouldn't be mapped

Street address:
City:

onclick Handler

Submit button has an "onclick" attribute which should fire if the button is clicked

Street address:
City:
State:
ZIP Code:

Similar field names

Fields all contain the word "address" and not all fields should be mapped

Company:
Street address:
City:
State:
ZIP Code:

Map using labels

Fields contain vague or irrelevant names/IDs; use associated labels instead

onsubmit Handler

Form has onsubmit="" attribute which should fire when form is submitted

Street address:
City:
State:
ZIP Code:

Two handlers

First the address should be verified, then the submit button's onclick handlers should fire, then the form's onsubmit handlers last

Street address:
City:
State:
ZIP Code:

Submit event handler

No submit button; form submit() invoked with jQuery should fire verification, if necessary, THEN a handler bound to submit, THEN submit the form.

Street address:
ZIP Code:
Submit Form

First line / Last line

Address formatted by only a street and lastline field.

Street address:
City/State/ZIP:

Secondary/Street2 fields

Form has both secondary and street2 fields, which ought not get confused. (No form should ever need both...)

Street address:
Address 2:
Unit:
City:
State:
ZIP Code:

State dropdown menu

Option values should be uppercase state abbreviations when at all possible, but this example uses lower-case abbreviations for failover testing. (No dropdown should ever default to a non-blank value, but this one does.)

Street address:
ZIP Code:
City:
State: