wpcf7_validate_{$type}

The contact-form-7 wpcf7 validate {$type} hook.

Published Date - July 22, 2023

Description

$result = apply_filters( "wpcf7_validate_{$type}", $result, $tag );

Parameters

  1. $result

  2. $tag


Usage

The following example is for adding a hook callback.

// define the wpcf7_validate_{$type} callback 
function custom_wpcf7_validate_type( $result, $tag ){ 
   //custom code here
    return $result
} 

//add the action 
add_filter('wpcf7_validate_{$type}', 'custom_wpcf7_validate_{$type}', 10, 2)

Defined

The filter is defined in the following location(s).

contact-form-7/includes/submission.php

$result = apply_filters( "wpcf7_validate_{$type}", $result, $tag );