#validate not overriding the submit function I'm creating a form in my own module (call it mymodule) and using a #validate property to clear the form. In my form definition, after calling hook_menu and hook_form,

function mymodule_myform($form_state){
$form['main']=array(
    '#type'=&gt;'fieldset',
    '#title'=&gt;t('Information'),
    '#collapsible'=&gt;TRUE,
    '#collapsed'=&gt;FALSE,
);
$form['main']['title']=array(
    '#description'=&gt;t('Enter title.'),
    '#type'=&gt;'textfield',
    '#size'=&gt;50,
    '#default_value'=&gt;'default',
);
$form['submit']=array(
        '#type'=&gt;'submit',
        '#value'=&gt;'Submit',
);
    $form['clear']=array(
        '#type'=&gt;'submit',
        '#value'=&gt;'Reset form',
        '#validate'=&gt;array('mymodule_myform_clear') //redirects to the _clear function defined below
);
    return $form;
}
    function mymodule_myform_clear($form, $form_state) {
        unset($form_state['values']);
        $form_state['rebuild']=TRUE; //clears the form
    }

    function mymodule_myform_submit($form, &amp;$form_state) {
        $values=$form_state['values'];
        die('the value you submitted: '.$values['title']);


Both functions get called when the Reset from button is pressed. Why is the #validate property not doing its job?
Like Clive said resetting $form_state['input'] is the solution, however I'd rather handle both actions in the submit function:

function mymodule_myform_submit($form, &amp;$form_state) {

  if($form_state['clicked_button']['#value'] == $form['clear']['#value']) {
    $form_state['input'] = array();
    $form_state['rebuild'] = TRUE;
  } else {
    $values = $form_state['values'];
    die('the value you submitted: '.$values['title']);
  }

}