Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author adispiac

    (@adispiac)

    Hi,
    You can use the ‘wppb_check_form_field_default-username’ filter to achieve that.

    Here’s a code sample to add some extra validation to the username field:

    //Extra validation for username field
    function wppb_extra_username_validation( $message, $field, $request_data, $form_location){
        if ('add your extra validation here'){
                return __( 'Add your error message here.', 'profilebuilder' );
            }
        return $message;
    }
    add_filter('wppb_check_form_field_default-username','wppb_extra_username_validation', 10, 4);

    Make sure to add your own validation conditions and desired error message.

    Thread Starter 2bearstudio

    (@2bearstudio)

    Thank you so much, it works. Cheers!

    Plugin Author adispiac

    (@adispiac)

    No worries, glad it works! If you find Profile Builder useful, please consider leaving a review.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to do extra username validation on new user registraiton’ is closed to new replies.