Joomla telephone Form Field Type

The telephone field type defines a field for entering a telephone number. Telephone numbers can be validated using the tel rule and filtered using the tel input filter. This field extends text field type.

You can also use pattern attribute to define the format of telephone numbers. The pattern attribute specifies a regular expression that the <input> element's value is checked against on form submission.

XML Field Definition

<field
 name="mytelephone" 
 type="telephone"  
 label="Enter phone number" />

Additional Parameters

maxlength: It limits the number of characters that may be entered.