Back
PhoneInput
Default (click the flag)
Include area code
Pre-selected Country
Error State
Please enter a valid phone number
Disabled
With Validation
Set Validate: true to enable client-side format validation on blur. Accepts 6–15 digits (spaces, dashes, and parentheses stripped).
Validated on blur — try typing letters or too few digits.
Usage
@forms.PhoneInput(forms.PhoneInputProps{
ID: "phone",
Name: "phone",
Label: "Phone Number",
Placeholder: "123 456 7890",
DefaultDial: "+1", // initial dial code
Validate: true, // enable client-side format validation on blur
// Countries: []forms.PhoneCountry{...} // custom list (optional)
Required: true,
Hint: "Include your area code",
})