• There’s a new type of spam. Human run. Passes recaptcha!

    But they always type same fname & lname
    Is there a way to add a validation/block for same fname & lname?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @blazmate,

    Please read Custom validation in order to learn more about this topic.

    Best regards,
    Yordan.

    Thread Starter blazmate

    (@blazmate)

    This is a filter, so it will live inside the theme file?
    Since I use
    <div class=”one-half first”>[text* fname placeholder “First Name*”]</div>
    <div class=”one-half”>[text* lname placeholder “Last Name*”]</div>

    I can’t test for a type, it’s just text?
    add_filter( ‘wpcf7_validate_text*’, ‘name_validation_filter’, 20, 2 );

    function name_validation_filter( $result, $tag ) {
    if ( ‘fname’ == $tag->name ) {
    if ( $_POST[‘fname’] == $_POST[‘lname’] ) {
    $result->invalidate( $tag, “Are you sure this is the correct address?” );
    }
    }

    return $result;
    }

    This will give an eerr msg, whereas the discussion spam words will just make the msg disappear right?

    • This reply was modified 3 years, 11 months ago by blazmate.
    • This reply was modified 3 years, 11 months ago by blazmate.
    Thread Starter blazmate

    (@blazmate)

    ok.
    seems you need only things that apply to all sites on the theme

    • This reply was modified 3 years, 11 months ago by blazmate.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Check double name’ is closed to new replies.