I want to validate Indian mobile numbers. The format of the mobile number is as follows:
9775876662, 8156652458, 7596658556, 6655485568
The regEx that is below:
function wpcf7_is_tel( $tel ){
$pattern = '%^[+]?' // + sign
. '(?:\([0-9]+\)|[0-9]+)' // (1234) or 1234
. '(?:[/ -]*' // delimiter
. '(?:\([0-9]+\)|[0-9]+)' // (1234) or 1234
. ')*$%';
$result = preg_match( $pattern, trim( $tel ) );
return apply_filters( 'wpcf7_is_tel', $result, $tel );
}
I want to change the pattern. Please help.