how to check the phone number field in joomla
<field
name="mobileno"
type="tel"
description="mobileno"
label="Mobileno"
pattern="[0-9]{10}"
required="true"
size="30"
/>
There are some ready made validations available including telephone validation. You just have to add validate="tel"
in your xml file.
<field
name="mobileno"
type="tel"
description="mobileno"
label="Mobileno"
validate="tel"
required="true"
size="30"
/>
Reference: Validation rules
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.