[-] FO : fixed validation of birthdates #PSCFV-5465
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user