Phone Validation Regex Pattern

Go to System → Settings → Checkout

Validate different formats of phone numbers using regular expressions. The Phone number is not required in the customer registration however you can require customers to enter the phone number in the Fast Checkout settings.

regular expressions

The default Phone Validation Regex Pattern /^[0-9]{3,32}$/ is a simple expression that will check if the number has a minimum of 3 digits and a maximum of 32 and nothing else.

To allow anything to match use the /(.*?)/ regex. 

To allow most phones use the /^[0-9\+\(\)\.\s\-,]+$/



AbanteCart, all rights reserved. 2024 ©