1

What is correct phone number format supported by contact form 7 telephone field. Is it something like ###-###-## or ### ### ## or ######## or +# ####### or any other ?

I tried searching about the format, but couldn't get any result. I'm trying to implement a client side validation check, for which I need to know format that is applied on server side by contact form 7.

closed as off-topic by Howdy_McGee Jan 25 '17 at 21:53

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • You can get a quick and great response if you post this in the plugin's support forum. Third party plugins are considered off-topic here. – bravokeyl Aug 9 '16 at 6:54
  • @bravokeyl - thanks for your reply. we do hardly get proper responses in plugin support page – Pankaj Aug 9 '16 at 7:26
2

A quick look for tel in the plugin gives me this check for telephone numbers:

function wpcf7_is_tel( $tel ) {
    $result = preg_match( '%^[+]?[0-9()/ -]*$%', $tel );
    return apply_filters( 'wpcf7_is_tel', $result, $tel );
}

Using the above function the plugin is validating whether the user input is a valid tel or not. So the above regex is the one that is used for validation.

Not the answer you're looking for? Browse other questions tagged or ask your own question.