下拉框 - 验证未被调用

有人能否给我一个关于 lightroom sdk 6.0中使用下拉框( LrView)的提示吗? 我的 validate 函数没有被调用. 我不知道为什么. 有人能给我提示我错在哪里吗? 以下是我的代码:

...
        local validateComboboxValue = function (view, value)
            outputToLog("在校验...")
            if(value ~= "是" and value ~= "否") then
                outputToLog("错误的值")
                view.value = "是"
                return false, "是", "无效输入"
            else
                outputToLog("有效的值")
                return true, value, ""
            end
        end
    ...
        f:combo_box {
            font = "<system>",
            title = "启用共享",
            enabled = bind 'enableSharingEnabled',
            items = {
                "是",
                "否"
            },
            value = bind 'sharingEnabled',
            width = LrView.share "label_width",
            immediate = true,
            validate = validateComboboxValue,
        },
    ...

我在 Windows 10 设备上使用 Lightroom。

点赞