83b5019e4d
* Add client side postcode validation * Prevent server-side validation * Adjust translation * Only validate postcode if country is available * Specify return type of isPostcode() * Convert function to static variable set * Refactor <ValidatedTextInput> for postcode validation * Refactor customValidationHandler * Use customValidationHandler as intermediate function * Hyphenate file names * Update packages/checkout/utils/validation/is-postcode.ts Co-authored-by: Mike Jolley <mike.jolley@me.com> * Normalise postcode on input * Fix usage of out of date value from input field --------- Co-authored-by: Mike Jolley <mike.jolley@me.com> |
||
---|---|---|
.. | ||
components | ||
context | ||
hocs | ||
hooks | ||
utils | ||
README.MD |
README.MD
Base Components/Context/Hooks
Base components are designed to be used on the frontend of a store. Due to this, we need to avoid using heavy WordPress externals as dependencies (wp-components, wp-block-editor, etc). To get around this, import from a local package instead.
e.g. Instead of importing from @wordpress/components
, use:
import { Component } from 'wordpress-components';
Check the built *.assets.php
files to ensure extra dependencies aren't being added to the build.