public function sanitizeString($str, $min = null, $max = null): string
    {
        $pattern = '/(;|\||`|>|<|&|^|"|'."\n|\r|'".'|{|}|[|]|\)|\()/i';
        $str  = preg_replace($pattern, '', $str);
        $str  = preg_replace('/\$/', '\\\$', $str);
        if ($this->isValidStringLength($str, $min, $max)) {
            return $str;
        }

        return false;
    }