[-] FO : fixed validation of birthdates #PSCFV-5465

This commit is contained in:
dMetzger
2012-11-09 13:13:29 +00:00
parent 38765f51b9
commit 20ad8912bb
+1 -1
View File
@@ -490,7 +490,7 @@ class ValidateCore
return true;
if (preg_match('/^([0-9]{4})-((0?[1-9])|(1[0-2]))-((0?[1-9])|([1-2][0-9])|(3[01]))( [0-9]{2}:[0-9]{2}:[0-9]{2})?$/', $date, $birth_date))
{
if ($birth_date[1] >= date('Y') - 9)
if ($birth_date[1] > date('Y') || $birth_date[2] > date('m') || $birth_date[3] > date('d'))
return false;
return true;
}