diff --git a/includes/form.inc b/includes/form.inc index a443b9ba9c6266c67508acad9c8a463f423c2d31..54cda836abe4bc5d9170a3d543444a097dd78171 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.')); } }