Contact Form 7 WordPress, checking a few fields, if empty then invalid

I solved my problem

add_filter('wpcf7_validate_text', 'or_input_validation_filter', 20, 2);

function or_input_validation_filter($result, $tag) {

    if ('your-link' == $tag->name) {
        $your_link = isset($_POST['your-link']) ? trim($_POST['your-link']) : '';
        $your_file = (!empty($_FILES["file-image"]["name"])) ? trim($_FILES['file-image']['name']) : '';

        if($your_link == '' && $your_file == '') {
            $result->invalidate($tag, "One of the fields has not been completed?");
        }
           
    }
    return $result;
}