Validation change
-
Hello, I need to update a validation function in validation-functions.php file.
I dont want to lose these changes with future updates. Is there any way I can override this function, i.e. in my child theme functions.php? This is the original function I need to override.
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 ); }
Thank you for any help.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Validation change’ is closed to new replies.