src/Schema.php
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;
    }
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;
    }
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 ; }
Validate and integer.

@param mixed $value The value to validate.
@param ValidationField $field The validation results to add.
@return int|Invalid Returns the cleaned value or **null** if validation fails.
Validate and integer .