| 5 form.inc | date_validate( |
| 6 form.inc | date_validate($element) |
| 7 form.inc | date_validate($element) |
| 8 form.inc | date_validate($element) |
Validates the date type to stop dates like February 30, 2006.
Related topics
1 string reference to 'date_validate'
File
- includes/
form.inc, line 1728
Code
function date_validate($element) {
if (!checkdate($element['#value']['month'], $element['#value']['day'], $element['#value']['year'])) {
form_error($element, t('The specified date is invalid.'));
}
}
Login or register to post comments
Comments
Seeking information
I am unable to understand what is the valid date format...
and also how to use this function...
what will be there in the $form in above program..