News:

AbanteCart v1.4.2 is released.

Main Menu

Enabline phone on contact page

Started by Getz, April 28, 2018, 05:52:54 AM

Previous topic - Next topic

Getz

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

abantecart

How did you add the number? Can you post your Regular Expression Pattern?

Below regex example is for number with format 000-0000-0000

$phone = '000-0000-0000';

if(preg_match("/^[0-9]{3}-[0-9]{4}-[0-9]{4}$/", $phone)) {
  // $phone is valid
}

Forum Rules Code of conduct
AbanteCart.com 2010 -