I've changed Gregorian date to Jalali date(I still want to save it in Gregorian) but I can't submit form since it say"Date validator error!" ,then I searched files for date validator function and found this :
public static function isDateValid( $month, $day, $year )
{
if ( !checkdate($month, $day, $year) )
{
return false;
}
return true;
}
but didn't help
so here's my question
when someone edit his/her birthday in profile edit(~profile/edit) where data go for validating ?
update: I found this but I couldn't understand anything
if ( empty($errorMessage) )
{
$errorMessage = 'Date Validator Error!';
}
update2: also I found this,but it wouldn't help either
private function setDefaultDate( $year, $month, $day )
{
if ( UTIL_Validator::isDateValid((int) $month, (int) $day, (int) $year) )
{
$this->defaultDate['year'] = (int) $year;
$this->defaultDate['month'] = (int) $month;
$this->defaultDate['day'] = (int) $day;
}
else
{
throw new InvalidArgumentException('Invalid date!');
}
Thank you