Microsoft.Common.PasswordBox UI 元素

一个可以用来提供和确认密码的控件。

UI 示例

Screenshot of Microsoft.Common.PasswordBox UI element.

架构

{
  "name": "element1",
  "type": "Microsoft.Common.PasswordBox",
  "label": {
    "password": "Password",
    "confirmPassword": "Confirm password"
  },
  "toolTip": "",
  "constraints": {
    "required": true,
    "regex": "^[a-zA-Z0-9]{8,}$",
    "validationMessage": "Password must be at least 8 characters long, contain only numbers and letters"
  },
  "options": {
    "hideConfirmation": false
  },
  "visible": true
}

示例输出

"p4ssw0rd"

备注

  • 此元素不支持 defaultValue 属性。
  • 有关 constraints 的实现详细信息,请参阅 Microsoft.Common.TextBox
  • 如果 options.hideConfirmation 设置为 true,则用于确认用户密码的第二个文本框会被隐藏。 默认值是 false秒。

后续步骤