Repository navigation
Tel
Viames Marino edited this page Jun 13, 2026
·
3 revisions
Pair\Html\FormControls\Tel renders <input type="tel">.
For reusable international phone validation, use Form::e164Phone(...) or call preset(FormValidationPreset::E164_PHONE).
render(): string- Inherited methods from FormControl:
placeholder(),pattern(),minLength(),maxLength(),inputmode(),value(),validate(),preset().
$phone = (new \Pair\Html\FormControls\Tel('phone'))
->placeholder('+1 555 123 4567')
->pattern('^[+0-9()\-\s]{6,20}$')
->inputmode('tel')
->required();
echo $phone->render();Office extension field:
$ext = (new \Pair\Html\FormControls\Tel('extension'))
->maxLength(6)
->pattern('^[0-9]{1,6}$');E.164 phone field:
$mobile = (new \Pair\Html\FormControls\Tel('mobile'))
// Normalizes separators away and validates the international form.
->preset(\Pair\Html\FormValidationPreset::E164_PHONE)
->placeholder('+393331234567');See also: Text, Search, FormControl, FormValidationPreset, PairValidation.js.
Maintained by Viames Marino — VM Ingegneria · Professional enquiries
Home · Setup · Configuration
Build with Pair 4
- Generator
- Controllers and responses
- Read models
- ActiveRecord and queries
- Forms and validation
- PairUI.js and HTML fragments
APIs and authentication
- API guide and CRUD
- Middleware and rate limits
- Users, sessions, and ACL
- Passkeys and social login
- Native mobile setup
Integrate and operate
- Integrations
- Runtime extensions and adapter keys
- Cache and cache stores
- Logs and observability
- PWA and push
- Packages and distribution
- Upgrade to v4