Custom Fields
Re-Envisioned
Support MB Frontend Submission rwmb_frontend_validate and user_login

  • Creator
    Topic
  • #33104
    Resolved Nicholas Cox
    Participant

    Hi

    is it possible to target the user_name/user_login inside the rwmb_frontend_validate filter?

    public function userRegisterFormValidation() {
    
    add_filter( 'rwmb_frontend_validate', function( $validate, $config ) {
        if ( 'dc-user' !== $config['id'] ) {
            return $validate;
        }
        if ( $_POST['user_login'] == 'example' ) {
            $validate = 'custom message'; 
        }
        return $validate;
    }, 10, 2 );
    }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.