Phone Number
A phone number input with optional country code and format validation.
Overview
The Phone Number field provides a dedicated input for telephone numbers. On mobile it triggers a numeric keyboard. You can configure it to accept international format (with country code prefix) or a specific national format using the pattern validation.
DynamicFormBuilder also supports Nepali number input via the nepali flag, which renders a Nepali-script numeral input widget for deployments targeting Nepali-speaking users.
Properties
| Property | Type | Default | Description |
|---|---|---|---|
| id | string | — | Unique field identifier (UUID in the builder). |
| type | string | phone | Must be "phone". |
| label | string | — | Human-readable label shown above the field or step heading. |
| required | boolean | false | When true, the form cannot submit without a value. |
| isHidden | boolean | false | Hides the field from respondents (may still store defaults). |
| isDisabled | boolean | false | Renders the field read-only. |
| instruction | string | undefined | Help text shown below the label (not the same as placeholder). |
| placeholder | string | undefined | Ghost text inside the control when empty. |
| validation.min | number | undefined | Minimum length (text) or minimum numeric value (number) or digit count (phone). |
| validation.max | number | undefined | Maximum length, numeric bound, or digit count (phone). |
| validation.pattern | string | undefined | Regex the value must match. |
| validation.message | string | undefined | Custom error when validation fails. |
| conditionalRules | array | undefined | Show this field when any rule matches another field's value. |
| logic | object | undefined | Simple visibility: depends_on + show_if_value. |
| reporting | object | undefined | Admin submissions table: includeInTable, labelOverride, sortable, filterable. |
| integrationKey | string | undefined | Stable alias for external integrations instead of id. |
| defaultCountry | string | undefined | Default ISO country code (e.g. NP, US). |
JSON Schema
{
"type": "phone",
"label": "Mobile Number",
"name": "mobile_number",
"required": true,
"placeholder": "+1 (555) 000-0000",
"validation": {
"pattern": "^\+?[1-9]\d{7,14}$",
"patternMessage": "Please enter a valid phone number"
}
}Common Use Cases
- SMS or OTP verification and two-factor workflows
- Delivery, callback, or support contact numbers
- Emergency contacts and next-of-kin details
- Sales or scheduling follow-up where voice or text is preferred
- Localized deployments using Nepali numeral mode where applicable