Custom validation for views exposed form using form alter I want to add my custom validation to the views exposed filter form for that I have added below code in hook_form_alter

$form['#validate'][] = 'xxxx_custom_form_validate';


But its being called for form load also, is there any specific way to add custom validation function for views exposed filters form.
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.

    }
  }
}