=== modified file 'includes/form.inc' --- includes/form.inc 2009-05-24 18:00:08 +0000 +++ includes/form.inc 2009-05-27 13:15:14 +0000 @@ -113,10 +113,6 @@ * write data, as this could lead to security issues. It is useful so that * searches do not need to have a form_id in their query arguments to * trigger the search. - * - must_validate: Ordinarily, a form is only validated once but there are - * times when a form is resubmitted internally and should be validated - * again. Setting this to TRUE will force that to happen. This is most - * likely to occur during AHAH or AJAX operations. * @return * The rendered form or NULL, depending upon the $form_state flags that were set. */ @@ -377,6 +373,9 @@ $form_state['programmed'] = TRUE; // Merge in default values. $form_state += form_state_defaults(); + // Reset form validation. + // If form validation fails once it fails for all subsequent elements! + form_set_error(NULL, '', TRUE); // reset all form errors drupal_prepare_form($form_id, $form, $form_state); drupal_process_form($form_id, $form, $form_state); @@ -653,12 +652,6 @@ * not be repeated in the submission step. */ function drupal_validate_form($form_id, $form, &$form_state) { - static $validated_forms = array(); - - if (isset($validated_forms[$form_id]) && empty($form_state['must_validate'])) { - return; - } - // If the session token was set by drupal_prepare_form(), ensure that it // matches the current user's session. if (isset($form['#token'])) { @@ -669,7 +662,6 @@ } _form_validate($form, $form_state, $form_id); - $validated_forms[$form_id] = TRUE; } /**