Skip to the content

address-plusアドレスプラス

Parse, validate, format and compare addresses locally, add country modules and mount an optional native form field.

address-plus extends the parse-address style with typed results, validation, formatting and country modules. About the name

Contents

Reference

Register the address field

import { … } from "@johnmorrisdotca/address-plus/element/define";

133.0 kB minified and gzipped, with everything it imports (measured with esbuild)

Exports

NameKindWhat it is
ADDRESS_FIELD_COUNTRIESconstantSeven built-in field countries; auto detects among them.
ADDRESS_FIELD_PARSE_KEYSconstantNative parser options checked by builder coverage.
ADDRESS_FIELD_VALIDATION_KEYSconstantNative validator options checked by builder coverage.
AddressFieldclassA form-associated address input using the seven native country parsers.
AddressFieldOptionstypeFull native settings and a private callback; raw addresses never enter public events.
defineFieldfunctionRegister the form field under its default or a custom tag, idempotently; safe on a server.

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/address-plus 1.7.0.