? 162788-80.update_check_disabled.d7.patch ? 200953_0.patch ? 237566-qunit_2.patch ? 294-html_template.patch ? 296322-12_actions_infinite_recursion_tests.patch ? 300993-drupalSetPermissions-D7_13.patch ? 301902-node-admin_20.patch ? 319033-25.update-sort-projects-D7.patch ? 321828-maintenance-page-4.patch ? 331180_3.patch ? 334238-update-core-package-D7_1.patch ? 343898-13-hidden-themes.patch ? 364219-fix-theme-links_4.patch ? 364219-fix-theme-links_6.patch ? 375931-f-u-stupid-bug-D7_0.patch ? 457450-followup.patch ? 457450-menu-link-hooks.patch ? 464862-53-drupal-css-class.patch ? 472820_0.patch ? 473268_edit_links_on_everything_72.patch ? 496500-fix-installation.patch ? 497948_6.patch ? 49941-discard-never.patch ? 505084_6.patch ? 510094.patch ? 513414_drupal_text_summary_79.patch ? 513414_drupal_text_summary_91.patch ? 516138-performance-issue_1_0.patch ? 517688-312-d7ux-overlay_0.patch ? 540282-toolbar-accessibility_11.patch ? 542206_2.patch ? 553944_menu_router_custom_theme_33.patch ? 555128-node-access-boolean-D7.patch ? 555712-toolbar-toggle_4.patch ? 556156_0.patch ? 556534_simpletest.module_help_typo.patch ? 557056_removing_the_body_fieldset_6.patch ? 560944-form-collapse_2.patch ? 564394-followup-kill-db-column.patch ? 564528.patch ? 564582-user-dead-code.patch ? 568224-default-filter-format.patch ? 572872-03.patch ? 595758.patch ? 600776-1.update-test-whitespace.patch ? 602518-1.filetransfer_inc_doc_cleanup.patch ? 67234-update-permission-D7_14.patch ? admin-config-people-file-path.patch ? admin_subitems-550718-29.patch ? aggregator-535564-tests.patch ? attached-links-on-everything-473268-114.patch ? autocomplete_32.patch ? autocomplete_translatable-557932-3.patch ? b69d64b4_1.patch ? batch-theme-11.patch ? better-install.patch ? blah.patch ? block_35.patch ? box-to-custom-block-2.patch ? changelog.txt_translatable_field.patch ? color-regex-D6.patch ? comment-fix-hook-load-569318-2.patch ? comment-unapproved-count_0.patch ? commit.txt ? contact-settings_0.patch ? contact_destination_broken-D7.patch ? conv2module_load_include.patch ? core-269337-61.patch ? cvs-release-notes.php ? d7ux_overlay_18.patch ? d7ux_overlay_22.patch ? dashboard-143.patch ? dblog-discard-never.patch ? death_to_ret_2.patch ? death_to_ret_3.patch ? decimal.patch ? die-admin-settings-die-v1.patch ? die_update_sql_4.patch ? die_update_sql_test.patch ? do575796-xri-test_1.patch ? drupal-testing.patch ? drupal.action-comment-publish.21.patch ? drupal.action-links.40.patch ? drupal.add-more_0.patch ? drupal.add-more_0.txt ? drupal.add-more_1.patch ? drupal.ajax-docs.patch ? drupal.all-actions-links.50.patch ? drupal.check-markup-access-text.patch ? drupal.class-array.40.patch ? drupal.class-array.42.patch ? drupal.comment-preview.32.patch ? drupal.css-load-unit-test.patch ? drupal.field-ui-admin.patch ? drupal.filter-flip-cache.24.patch ? drupal.filter-format-crud.15.patch ? drupal.form-item-classes.13.patch ? drupal.form-state-defaults.patch ? drupal.form-wrapper.31.patch ? drupal.hook-user-revamp.56.patch ? drupal.image-menu-title.patch ? drupal.jquery-once-58-add-once-only.patch ? drupal.machine-taxonomy.patch ? drupal.machine.58.patch ? drupal.maintenance.45.patch ? drupal.menu-custom-api.73.patch ? drupal.menu-custom-api.80.patch ? drupal.menu-local-tasks-alter.14.patch ? drupal.module-theme-rebuild.patch ? drupal.node-type-menu.1.patch ? drupal.node-type-reset.patch ? drupal.parse-url-unclean.10.patch ? drupal_cron_run_ouch_2.patch ? drupal_cron_run_ouch_4.patch ? drupal_http_request_drupal7.patch ? drupal_match_path_tests_05.patch ? field-590590-1.patch ? field-reserved-names-382464-29.patch ? field.patch ? field_3.patch ? field_attach_namespace-reroll2.patch ? field_attach_test-559486-4.patch ? field_attach_tests-559486-10.patch ? field_attach_tests_0.patch ? field_sql_storage_deleted_tables_0.patch ? field_ui_menu_rebuild.patch ? field_ui_wipe_display.patch ? field_ui_wipe_weights-554290-6.patch ? field_widget_langcode-559506-5.patch ? fields_0_0.patch ? fields_0_0_0.patch ? file-inc-file_unmanaged_delete-recursive--handle-stream-wrappers.patch ? file.patch ? file_module_1.patch ? filetransfer_backend_form_common.code-style.patch ? filter-escape-html-2.patch ? forum-fix-duplicate-ids-rev11.patch ? good_bye5.patch ? hook_mail_alter_ex1.patch ? hook_menu_t-2.patch ? hook_page_build.patch ? icons_5.zip ? image-field-560780-60.patch ? image-lock-2.patch ? image_303419_3.patch ? image_field_4.patch ? image_field_6.patch ? infolinks_0.patch ? install-api-whitespace-followup-2.patch ? install-profile-name-passthrough-561278-1.patch ? install-state-by-reference-2.patch ? install.php_.notice.patch ? issue-557220-simpletest-accessibility-1.patch ? langcode.patch ? language_negotiation-282191-79.patch ? language_negotiation-282191-90.patch ? mail-fix.patch ? maintainers_0.patch ? menu-api-fixes-509584-29.patch ? menu-test-file-block.patch ? menu-tree-data-test-566094.patch ? menu_execute_active_handler-1.patch ? menu_rebuild_revert.patch ? modal_5.patch ? module_implements_30.patch ? module_implements_32.patch ? move_file_uploads_to_media.patch ? movestats-1.patch ? nav_headers_364219_repair.patch ? nb2_1.diff ? newpatch.patch ? node-load-multiple-array-diff_0.patch ? node_title_0.patch ? node_types_rebuild_install.patch ? nodeaccess-changelog.patch ? non-ref-558538-1.patch ? nonrecoverable_install_589754_08.patch ? obsolete-class-box.patch ? openid-login-destination_1.patch ? openid-login.patch ? openid.patch ? outline_1.patch ? page_28.patch ? partial_validation.patch ? password_reset_patch_545230_06.patch ? performance-hunk.patch ? pluggable-smtp-331180-66.patch ? plugin_php-538660-31.patch ? preexecute_1.patch ? reg-changelog-txt.patch ? region-tpl-60552-43.patch ? registry_rip-497118-153.patch ? release-notes.php ? remove_fieldset_body_title_01_0.patch ? removing-pleases.patch ? robots.txt_2.patch ? sdo-846-openid-association-csrf-D7.patch ? sdo-846-openid-association-csrf.patch ? search-aliases.patch ? search-metadata.patch ? search_dbtng_7.patch ? select_random_3.patch ? seven_css.patch ? skipnav_386462_v7.patch ? static-by-reference-forgotten.patch ? stopit_2.patch ? submitted-no-more-364470-21.patch ? subtheme-screenshot-489762-30.patch ? system-administration-theme-link.patch ? system-category_0.patch ? system-doc-556618-3.patch ? taxonomy_65.patch ? taxonomy_67.patch ? tf1.patch ? tf3-node-title_0.patch ? theme-settings-help-562188-1.patch ? theme_exception_3.patch ? title_as_field-557292-81.patch ? toolbar_9.png ? translatable_fields-367595-220.patch ? translatable_fields-367595-220_0.patch ? translatable_fields-367595-239.patch ? translatable_setting-563998-6.patch ? unstatic.diff ? update_44.patch ? user-operations-load-multiple-1.patch ? user-themes.patch ? wow-minor-typo.patch ? includes/.new.0vMh1w ? misc/admin_links.css ? misc/admin_links.js ? misc/attached_links.css ? misc/attached_links.js ? modules/.DS_Store ? modules/dashboard ? modules/file/.DS_Store ? modules/node/.new.JEtra2 ? modules/overlay/.DS_Store ? modules/overlay/images ? modules/overlay/overlay-child.js ? modules/overlay/overlay-parent.css ? modules/overlay/overlay-parent.js ? modules/overlay/overlay.api.php ? modules/overlay/overlay.module ? modules/simpletest/qunit.php ? modules/simpletest/test.js ? modules/simpletest/testrunner.js ? modules/simpletest/testsuite.css ? modules/simpletest/tests/drupal.test.js ? modules/system/.new.tQqW6S ? sites/default/files ? sites/default/private ? sites/default/settings.php Index: includes/form.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/form.inc,v retrieving revision 1.382 diff -u -p -r1.382 form.inc --- includes/form.inc 10 Oct 2009 16:48:37 -0000 1.382 +++ includes/form.inc 13 Oct 2009 06:53:27 -0000 @@ -833,7 +833,7 @@ function _form_validate($elements, &$for // A simple call to empty() will not cut it here as some fields, like // checkboxes, can return a valid value of '0'. Instead, check the // length if it's a string, and the item count if it's an array. - if ($elements['#required'] && (!count($elements['#value']) || (is_string($elements['#value']) && strlen(trim($elements['#value'])) == 0))) { + if ($elements['#required'] && !_form_validate_skip($elements, $form_state) && (!count($elements['#value']) || (is_string($elements['#value']) && strlen(trim($elements['#value'])) == 0))) { form_error($elements, $t('!name field is required.', array('!name' => $elements['#title']))); } @@ -871,7 +871,7 @@ function _form_validate($elements, &$for } // Call any element-specific validators. These must act on the element // #value data. - elseif (isset($elements['#element_validate'])) { + elseif (isset($elements['#element_validate']) && !_form_validate_skip($elements, $form_state)) { foreach ($elements['#element_validate'] as $function) { if (function_exists($function)) { $function($elements, $form_state, $form_state['complete form']); @@ -883,6 +883,36 @@ function _form_validate($elements, &$for } /** + * Check if an element's validation should be skipped. + * + * This is used to skip #required and #element_validate properties but never + * properties that should be enforced by HTML, such as #maxlength or #options. + * + * @param $element + * The element whose parents will be checked to determine if this element's + * validation should be skipped. + * @param $form_state + * The form state. The 'clicked_button' property will be checked to determine + * which elements should be validated. + * @return + * Boolean TRUE if the element should not be validated. FALSE if the element + * should be validated. + */ +function _form_validate_skip($element, $form_state) { + $skip = FALSE; + if (isset($form_state['clicked_button']['#validate_section'])) { + $parents = $form_state['clicked_button']['#validate_section']; + foreach ($parents as $key => $parent) { + if ($element['#parents'][$key] != $parent) { + $skip = TRUE; + break; + } + } + } + return $skip; +} + +/** * A helper function used to execute custom validation and submission * handlers for a given form. Button-specific handlers are checked * first. If none exist, the function falls back to form-level handlers. Index: modules/field/field.form.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/field/field.form.inc,v retrieving revision 1.28 diff -u -p -r1.28 field.form.inc --- modules/field/field.form.inc 9 Oct 2009 19:22:56 -0000 1.28 +++ modules/field/field.form.inc 13 Oct 2009 06:53:28 -0000 @@ -196,7 +196,8 @@ function field_multiple_value_form($fiel '#name' => $field_name . '_add_more', '#value' => t('Add another item'), '#attributes' => array('class' => array('field-add-more-submit')), - // Submit callback for disabled JavaScript. + '#validate' => array(), + '#validate_section' => array($field_name), '#submit' => array('field_add_more_submit'), '#ajax' => array( 'callback' => 'field_add_more_js', Index: modules/poll/poll.module =================================================================== RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v retrieving revision 1.317 diff -u -p -r1.317 poll.module --- modules/poll/poll.module 11 Oct 2009 03:07:19 -0000 1.317 +++ modules/poll/poll.module 13 Oct 2009 06:53:29 -0000 @@ -271,7 +271,9 @@ function poll_form($node, $form_state) { '#value' => t('More choices'), '#description' => t("If the amount of boxes above isn't enough, click here to add more choices."), '#weight' => 1, - '#submit' => array('poll_more_choices_submit'), // If no javascript action. + '#validate' => array(), + '#validate_section' => array('choice_wrapper'), + '#submit' => array('poll_more_choices_submit'), '#ajax' => array( 'callback' => 'poll_choice_js', 'wrapper' => 'poll-choices',