Validates custom form field values.
function vs_netflix_custom_registration_fields_check($form_fields) {
$field_details = array(
'error' => false,
'message' => null
);
if( isset($form_fields['new_user_twitter_handle']) && empty($form_fields['new_user_twitter_handle']) ) {
$field_details['error'] = true;
$field_details['message'] = __('Please provide a Twitter profile URL', 'vs-netflix');
}
return $field_details;
}
add_filter('wpvs_check_custom_registration_form_fields', 'vs_netflix_custom_registration_fields_check', 10, 1);
Comments
0 comments
Article is closed for comments.