Renamed function _split_date, added average age calculation to summary report
This commit is contained in:
@@ -796,12 +796,8 @@ function _booking_validate($node, &$form_state) {
|
||||
if (strlen(trim($email)) > 0 && !_valid_email_address($email))
|
||||
form_set_error('booking_email', t('You must enter a valid e-mail address. Please ensure you typed your email address correctly.'));
|
||||
|
||||
//calculate DOB limit as defined by configuration
|
||||
$max_dob_matches = _split_date(variable_get('booking_max_dob','0'));
|
||||
|
||||
$max_dob_check= mktime(12, 0, 0, $max_dob_matches[2], $max_dob_matches[3], $max_dob_matches[1]);
|
||||
//if DOB on form is more recent than DOB limit, display validation error
|
||||
if ($dob_check > $max_dob_check)
|
||||
if ($dob_check > _booking_max_dob_ts())
|
||||
form_set_error('booking_dob', t('Unfortunately you are too young to attend !event.',
|
||||
array('!event' => variable_get('booking_event_name','this event'))));
|
||||
|
||||
|
Reference in New Issue
Block a user