function date_validate in Drupal 5
Same name and namespace in other branches
- 4 includes/form.inc \date_validate()
- 6 includes/form.inc \date_validate()
- 7 includes/form.inc \date_validate()
Validates the date type to stop dates like February 30, 2006.
Related topics
File
- includes/
form.inc, line 1223
Code
function date_validate($form) {
if (!checkdate($form['#value']['month'], $form['#value']['day'], $form['#value']['year'])) {
form_error($form, t('The specified date is invalid.'));
}
}