#58536, A #required element always needs validation, patch by chx

fixes checkboxes, radios, and selects.
4.7.x
Gerhard Killesreiter 2006-04-13 14:56:13 +00:00
parent ab9f953246
commit 6b80d55a80
1 changed files with 1 additions and 1 deletions

View File

@ -366,7 +366,7 @@ function form_builder($form_id, $form) {
} }
} }
// Mark all posted values for validation // 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; $form['#needs_validation'] = TRUE;
} }
} }