• Resolved craigmckee

    (@craigmckee)


    Is it possible on the username fields for example to add some validation that only allows letters and numbers, no special characters etc?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support alexandrubodea

    (@alexandrubodea)

    Hi @craigmckee,

    This is possible through custom code. For example, we have the following filter:

    add_filter( 'wppb_check_form_field_default-username', 'wppbc_custom_validation_for_username', 10, 4 );
    function wppbc_custom_validation_for_username( $message, $field, $request_data, $form_location ){
    if( false ){
    return 'Invalid username...';
    }
    }

    You need to create your own conditions there, and this should work as expected

    Thread Starter craigmckee

    (@craigmckee)

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Field Validation’ is closed to new replies.