Commit 9cd66739 authored by webchick's avatar webchick

Issue #188947 by lyricnz: Fixed date_validate()(form) should be date_validate()(element).

parent c0bfd275
......@@ -2853,9 +2853,9 @@ function form_process_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.'));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment