The contact-form-7 wpcf7 validate {$tag->type} hook.
Published Date - July 22, 2023
$result = apply_filters(
"wpcf7_validate_{$tag->type}",
$result, $tag,
array(
'uploaded_files' => $new_files,
)
);
$result
$tag
$array
The following example is for adding a hook callback.
// define the wpcf7_validate_{$tag->type} callback
function custom_wpcf7_validate_tag->type( $result, $tag, $array ){
//custom code here
return $result
}
//add the action
add_filter('wpcf7_validate_{$tag->type}', 'custom_wpcf7_validate_{$tag->type}', 10, 3)
The filter is defined in the following location(s).
contact-form-7/includes/submission.php
$result = apply_filters(
"wpcf7_validate_{$tag->type}",
$result, $tag,
array(
'uploaded_files' => $new_files,
)
);