Patch Changes
-
chore: improve bundling and dependency posture (#278)
- Add
"sideEffects": ["*.css"]so bundlers can tree-shake modules that
consumers don't use (e.g. the unicode-flags data) instead of conservatively
retaining everything the assets barrel touches. - Loosen the
libphonenumber-jsdependency to^1.13.7so consumers can dedupe
to a single copy and pick up patch fixes, instead of being pinned to an exact
version.
- Add
-
fix: an empty field no longer reports
COUNTRY_NOT_ALLOWED(#278)getValidationErrornow short-circuits on an empty value before evaluating the
lockCountry/allowedCountriesconstraints. Previously, a blank input with a
preselected country outsideallowedCountries(or conflicting under
lockCountry) was flaggedCOUNTRY_NOT_ALLOWED, and a non-required blank field
was marked invalid. An empty field now resolves toREQUIRED(whenrequired)
or valid. -
docs: correct the JSDoc on
allowedCountriesto reference the real (#278)
validationErrorvalue'COUNTRY_NOT_ALLOWED'(was the lowercase
'country_not_allowed', which never matches).