tel field
The field is used to enter numerical values.
- Keyword
tel
. - WhatWG Specification.
Options
autofocus Optional
- Type
boolean | 'true' | 'false'
If this parameter is passed, when setting this field, control will be automatically transferred to it.
Also all parameters common to all FormField
. Information about them can be found on this page.
Meaning
This field works with a string value.
- The field is available when using
Tab
andShift + Tab
. - Lock cancels
Tab
navigation. - Blocking a field changes the style of
number
. - Validation error changes
number
style. - The resulting field value is a string of numbers.
- The field format is used exclusively for entering mobile numbers. In other cases, it is necessary use
text
andpretty/modify
attributes. - The field should display the icon of the country to which the entered phone belongs, empty - in case if the number could not be processed. The analysis of the entered data lies with
libphonenumber-js
. - Icons used to display country affiliation are taken from flagcdn.com.
Example
There are no additional required parameters for this field, so we need to specify only type
and name
:
html
<form-field name="phone" type="tel"/>
<form-field name="phone" type="tel"/>
ts
import {FormField} from "jenesius-vue-form";
import {FormField} from "jenesius-vue-form";
Default field:
Enter value
?
In locked state:
Disabled
?
Field not validated:
Error
?
The password is too simple
The current state of the form:
ts
{}
{}