src/Util/Validator.php
protected function validateInteger($field, $value, $params)
    {
        if (isset($params[0]) && (bool) $params[0]) {
            //strict mode
            return preg_match('/^(\d|-[1-9]|-?[1-9]\d*)$/i', $value);
        }

        return \filter_var($value, \FILTER_VALIDATE_INT) !== false;
    }
protected function validateInteger($field, $value, $params)
    {
        if (isset($params[0]) && (bool) $params[0]) {
            //strict mode
            return preg_match('/^(\d|-[1-9]|-?[1-9]\d*)$/i', $value);
        }

        return \filter_var($value, \FILTER_VALIDATE_INT) !== false;
    }
protected function validateInteger ( $ field , $ value , $ params ) { if ( isset ( $ params [ 0 ] ) && ( bool ) $ params [ 0 ] ) { //strict mode return preg_match ( '/^(\d|-[1-9]|-?[1-9]\d*)$/i' , $ value ) ; } return \ filter_var ( $ value , \ FILTER_VALIDATE_INT ) !== false ; }
Validate that a field is an integer

@param  string $field
@param  mixed  $value

@return bool
Validate that a field is an integer