ValidatedPhoneInput
v1.0.9Updated 27 Aug 2026Masked phone input with country-specific completeness validation across 12 countries (TH/US/UK/SG/AU/JP/KR/CN/PH/MY/ID/VN). Searchable country picker on the left, masked local number on the right (react-imask), plus E.16
Preview
Live · 10 storiesThaiByDefaultOpen ↗
▸Why this is recommendedformphonevalidationmask+4
ValidatedPhoneInput — thai by default.
Recommended for+14
- ✓International signups
- ✓KYC / contact capture
- ✓SMS-verification flows
- ✓Shipping-address phone field
Tags+6
formphonevalidationmaskcountrye164internationalthaibydefault
Features+4
- Country-specific digit-length + mask validation (12 countries)
- Searchable country picker (name / ISO / dial code)
- react-imask masked entry
- E.164 normalisation via toE164() helper
- showE164Format renders normalised number below
- Lockable to a single country (showCountryPicker=false)
- Server-error injection
- i18n: labels prop + country names localized via Intl.DisplayNames (LocaleProvider locale)
Not recommended for−2
- ✕Free-text input (use Input)
- ✕Display-only formatting (use InputMask)
Install
Ask your agent, or call the MCP tool directly. The resolved bundle is written into your project.
Usage
Tick variants in the left menu — each adds a tab with that variant’s real story source, the same code the preview above renders.
Props
PropTypeRequired
valueRaw local-number value
—onValueChangeValue callback
—countryActive ISO country
—onCountryChangeCountry callback
—availableCountriesRestrict picker list
—showCountryPickerShow the leading picker (default true)
—showE164FormatShow normalised E.164 below
—validateOnValidation timing
—serverErrorForced server-side error
—labelsOverride built-in UI strings (i18n)
—