Custom validation for views exposed form using form alter
To form alter a specific view exposed filter form, you need 2 conditions to check: the form id &amp; the form's '#id' element. 

function MYMODULE_form_alter(&amp;$form, $form_state, $form_id) {

  // @NOTE: $form['#id'] will vary based on your your view &amp; display machine names.
  // Here the view machine name is 'view' &amp; display machine name is 'display'.
  // Use Devel's dpm() to inspect or the Views administration UI
  // to find your own form's values.

  if ($form_id == 'views_exposed_form') {
    if ($form['#id'] == 'views-exposed-form-view-display') {
      // @TODO: Add form alter code.

    }
  }
}