It's a bad way to go, but it works for me.
open \meta-box-aio\vendor\meta-box\mb-user-profile\src\Forms\Base.php
if (!$is_valid) {
$this->error->set(__('Invalid form submit.', 'mb-user-profile'));
return null;
}
modify to
if (!$is_valid[0]){
$this->error->set($is_valid[1]);
return null;
}
add_filter( 'rwmb_profile_validate', function( $is_valid, $config ) {
if ( 'invitation_verification' === $config['id'] ) {
if ( '123' !== $_POST['invitation_code'] ) {
$is_valid = [false,'Error Text'];
}
}
return $is_valid;
}, 10, 2 );