summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--includes/form.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/form.inc b/includes/form.inc
index a443b9b..54cda83 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -1720,9 +1720,9 @@ function expand_date($element) {
/**
* Validates the date type to stop dates like February 30, 2006.
*/
-function date_validate($form) {
- if (!checkdate($form['#value']['month'], $form['#value']['day'], $form['#value']['year'])) {
- form_error($form, t('The specified date is invalid.'));
+function date_validate($element) {
+ if (!checkdate($element['#value']['month'], $element['#value']['day'], $element['#value']['year'])) {
+ form_error($element, t('The specified date is invalid.'));
}
}