function Result()

in packages/playground/src/functions.tsx [33:50]


    function Result(
        event: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>,
        newValue?: string
    ): void {
        if (
            !newValue ||
            ((newValue.startsWith("http") || newValue.startsWith("https")) &&
                newValue.includes(".") &&
                newValue.lastIndexOf(".") != newValue.length - 1) ||
            (!newValue && newValue[0] == "/")
        ) {
            settingErrorMsg("");
            settingActualUrl(newValue || "");
        } else {
            settingErrorMsg("Error: Invalid URL (must begin with HTTP or /)");
            settingActualUrl(newValue);
        }
    }