AbanteCart Community

Shopping Cart Operations => Support => Topic started by: Getz on April 28, 2018, 05:52:54 AM

Title: Enabline phone on contact page
Post by: Getz 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
Title: Re: Enabline phone on contact page
Post by: abantecart 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
}