Microsoft.Common.CheckBox UI 元素

CheckBox 控件允许用户检查或不检查某选项。 检查了控件后,控件返回“true”,未检查时返回“false” 。

UI 示例

Screenshot of Microsoft.Common.CheckBox UI element with an unchecked state.

架构

{
    "name": "legalAccept",
    "type": "Microsoft.Common.CheckBox",
    "label": "I agree to the terms and conditions.",
    "constraints": {
        "required": true,
        "validationMessage": "Please acknowledge the legal conditions."
    }
}

示例输出

true

备注

将“必需”设置为“true”时,用户必须选中该复选框 。 如果用户未选中该复选框,会显示验证消息。

后续步骤