So I'm assuming that the problem is that you only want the regex errors in the error array? Maybe something like:
PHP Code:
//some code
function filter_field_errors($params)
{
if ($params[1] == 'required_field_x_missing_or_invalid')
array_pop({$params[0]}->errors);
}
$vbulletin->input->clean_array_gpc('r', array(
'userfield' => TYPE_ARRAY,
));
$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_ARRAY);
$userdata->set_failure_callback('filter_field_errors');
// set profile fields
$customfields = $userdata->set_userfields($vbulletin->GPC['userfield'], true, 'normal');
//some more code
(BTW I haven't tried this at all, even to check for typos).