From 6b80d55a80a742b03929b68ffc689580dc5d5626 Mon Sep 17 00:00:00 2001
From: Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org>
Date: Thu, 13 Apr 2006 14:56:13 +0000
Subject: [PATCH] #58536, A #required element always needs validation, patch by
 chx fixes checkboxes, radios, and selects.

---
 includes/form.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/includes/form.inc b/includes/form.inc
index 7937b860d1ec..a939859faf7c 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -366,7 +366,7 @@ function form_builder($form_id, $form) {
             }
         }
         // Mark all posted values for validation
-        if (isset($form['#value']) && $form['#value'] === $edit) {
+        if ((isset($form['#value']) && $form['#value'] === $edit) || (isset($form['#required']) && $form['#required'])) {
           $form['#needs_validation'] = TRUE;
         }
       }
-- 
GitLab