public function validateAttribute($object, $attribute)
{
if (isset($object->{$attribute}) && !empty($object->{$attribute})) {
if (!$this->validateValue($object->{$attribute})) {
if (strtotime($object->{$attribute}) != false) {
$this->addError($object, $attribute, $object->getAttributeLabel($attribute) . ' is not in valid format: ' . $object->{$attribute});
} else {
$this->addError($object, $attribute, $object->getAttributeLabel($attribute) . ' is not a valid date: ' . $object->{$attribute});
}
return false;
}
return true;
}
}