i have Kept the placeholder as xxx-xxx-xxxx

<label> Phone Number </label> [number* shm-mrk-phone minlength:10 maxlength:140 placeholder "]

i changes the tel script in plugin formatting.php

function wpcf7_is_tel( $tel ) {
    $result = preg_match( '/^(?:(d{3})|d{3}-)d{3}-d{4}$/', $tel );
    return apply_filters( 'wpcf7_is_tel', $result, $tel );
}

its not allowing xxx-xxx-xxxx( this should allow), its allowing xxxxxxxxxx

Thanks.

Read more here: WordPress phone Number Restrict to allow xxx-xxx-xxxx Format


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: