protected function validateInteger($value, ValidationField $field) {
        if ($field->val('format') === 'timestamp') {
            return $this->validateTimestamp($value, $field);
        }

        $result = filter_var($value, FILTER_VALIDATE_INT);

        if ($result === false) {
            $field->addTypeError($value, 'integer');
            return Invalid::value();
        }

        $result = $this->validateNumberProperties($result, $field);

        return $result;
    }