make birthday date check also work for 200 years more in the future

This commit is contained in:
Christian Binder 2009-12-02 11:18:20 +00:00
parent 144f5fe24c
commit c3df45932f

View File

@ -506,7 +506,7 @@ class addressbook_bo extends addressbook_so
}
// check for valid birthday date
if ($field_name == 'bday' && $field_value != null &&
!preg_match('/^(18|19|20)\d{2}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/',$field_value))
!preg_match('/^(18|19|20|21|22)\d{2}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/',$field_value))
{
$fields_to_update[$field_name] = $field_value = null;
}