• mcpacific

    (@mark_cox)


    We have the FS Contact Form version 4.0.39 installed on our WordPress site. Everything seems to work except the phone number validation. We are using the regex code that was provided by default:

    ^(\+1|1)?[-\.\s]?([0,2-9]{3}[-\.\s]?\d{3}[-\.\s]?\d{4}|\(?[0,2-9]{3}\)?[-\.\s]?\d{3}[-\.\s]?\d{4})$

    However, it errors out no matter what phone number format is provided. We’ve used all digits (3235551212), with hyphens (323-555-1212) and even the +1 format (+1-323-555-1212). All report the error message we’ve configured, “Please enter a valid phone number.”

    https://www.ads-software.com/plugins/si-contact-form/

Viewing 1 replies (of 1 total)
  • mbrsolution

    (@mbrsolution)

    Hi try the following regex code.

    /^[0-9]{2}[ ][0-9]{2}[ ][0-9]{2}[ ][0-9]{2}[ ][0-9]{2}$/

Viewing 1 replies (of 1 total)
  • The topic ‘Phone number validation isn't working’ is closed to new replies.