search_form_validate

Versions
4.7 – 5
search_form_validate($form_id, $form_values, $form)
6 – 7
search_form_validate($form, &$form_state)

As the search form collates keys from other modules hooked in via hook_form_alter, the validation takes place in _submit. search_form_validate() is used solely to set the 'processed_keys' form value for the basic search form.

Related topics

Code

modules/search/search.module, line 1015

<?php
function search_form_validate($form_id, $form_values, $form) {
  form_set_value($form['basic']['inline']['processed_keys'], trim($form_values['keys']));
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.