Class: Glib::JsonUi::ViewBuilder::Fields::Phone

Inherits:
AbstractField show all
Defined in:
app/helpers/glib/json_ui/view_builder/fields.rb

Overview

International phone number input field.

Provides phone number input with country code selector and automatic formatting. Includes validation for phone number formats.

Examples:

Basic phone field with auto-detect

form.fields_phone \
  name: 'user[phone1]',
  width: 'matchParent',
  label: 'Phone field',
  clearable: true

Phone field with default country (no auto-detect)

form.fields_phone \
  name: 'user[phone2]',
  width: 'matchParent',
  label: 'Phone field with Australia as the default country',
  disableAutoDetect: true,
  defaultCountry: 'AU'

See Also:

  • Garage example

Instance Attribute Summary

Attributes inherited from JsonUiElement

#json, #page

Method Summary

Methods inherited from AbstractField

#autoValidate, #context, #created, #default_url_options, #determine_value, #disableDirtyCheck, #hint, #hint_args, #label, #label_args, #name, #placeholder, #placeholder_args, #prop, #validation, #value

Methods inherited from View

component_name

Methods inherited from JsonUiElement

#initialize, #props

Constructor Details

This class inherits a constructor from Glib::JsonUi::JsonUiElement