How to check phone number in xml form field

how to check phone number field in joomla

<field name="mobileno" type="tel" description="mobileno" label="Mobileno" pattern="[0-9]{10}" required="true" size="30" /> 
+4
source share
1 answer

There are some ready-made checks, including a phone check. You just need to add validate="tel" to your XML file.

 <field name="mobileno" type="tel" description="mobileno" label="Mobileno" validate="tel" required="true" size="30" /> 

Link: Validation Rules

+2
source

All Articles