Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Enabline phone on contact page  (Read 2275 times)

Offline Getz

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Enabline phone on contact page
« on: April 28, 2018, 05:52:54 AM »
I have added the phone option to enable customers to leave their phone number on the contact us page.
however they receive an error "number does not appear to be valid!"
it is possible that I have the incorrect Regular Expression Pattern:
can someone please assist with the Regular Expression Pattern or advise on how to set this up
thanks

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Enabline phone on contact page
« Reply #1 on: April 28, 2018, 09:35:27 PM »
How did you add the number? Can you post your Regular Expression Pattern?

Below regex example is for number with format 000-0000-0000
Code: [Select]
$phone = '000-0000-0000';

if(preg_match("/^[0-9]{3}-[0-9]{4}-[0-9]{4}$/", $phone)) {
  // $phone is valid
}
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

 

Powered by SMFPacks Social Login Mod