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;
    }