Custom validate exposed filter on a view
Another approach is to use hook_form_FORM_ID_alter() like other answers suggest, but to put custom validation before the default validation callback of views. By this way you can stop to step over to the second validation callback if validation fails, otherwise validation continues to process.. Example:

function MY_THEME_OR_MODULE_form_views_exposed_form_alter(&amp;$form, &amp;$form_state) {
  if ($form['#id'] == 'views-exposed-form-MY_VIEWS_NAME_MY_VIEWS_DISPLAY') {
    array_unshift($form['#validate'], 'my_custom_validation_callback');
  }
}

function my_custom_validation_callback($form, &amp;$form_state) {
  if(/* CONDITION */) {
    form_set_error('user_category', 'please enter a value');
  }
}