Commit 09efe4f4 authored by Gábor Hojtsy's avatar Gábor Hojtsy

Issue #260934 by catch, ShawnClark, Jody Lynn, Island Usurper, joshmiller,...

Issue #260934 by catch, ShawnClark, Jody Lynn, Island Usurper, joshmiller, anrikun, roychri, pdrake, Dave Cohen, sun, plach, bjaspan: When drupal_execute()ing multiple forms with same form_id in a page request, only the first one was validated.
parent 5f6ff335
......@@ -305,6 +305,11 @@ function drupal_execute($form_id, &$form_state) {
$form = call_user_func_array('drupal_retrieve_form', $args);
$form['#post'] = $form_state['values'];
// Reset form validation.
$form_state['must_validate'] = TRUE;
form_set_error(NULL, '', TRUE);
drupal_prepare_form($form_id, $form, $form_state);
drupal_process_form($form_id, $form, $form_state);
......@@ -575,7 +580,7 @@ function drupal_prepare_form($form_id, &$form, &$form_state) {
function drupal_validate_form($form_id, $form, &$form_state) {
static $validated_forms = array();
if (isset($validated_forms[$form_id])) {
if (isset($validated_forms[$form_id]) && empty($form_state['must_validate'])) {
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment