protected function _validateFormat(AnConfig $config)
    {
        $property = $config->property;
        $value = $config->value;
        $entity = $config->entity;
        $filter = $config->options;

        if (!empty($value) && $property->isAttribute() && $property->isScalar()) {
            if ($this->getFilter($filter)->validate($value) === false) {
                $entity->addError(array(
                    'message' => $property->getName().' must have the format of '.$filter,
                    'code' => AnError::INVALID_FORMAT,
                    'key' => $property->getName(),
                    'format' => $filter,
                ));

                return false;
            }
        }

        return true;
    }