แก้ไข

แชร์ผ่าน


Microsoft.Common.PasswordBox UI element

A control that can be used to provide and confirm a password.

UI sample

Screenshot of Microsoft.Common.PasswordBox UI element.

Schema

{
  "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
}

Sample output

"p4ssw0rd"

Remarks

  • This element doesn't support the defaultValue property.
  • For implementation details of constraints, see Microsoft.Common.TextBox.
  • If options.hideConfirmation is set to true, the second text box for confirming the user's password is hidden. The default value is false.

Next steps