PasswordInput
Password input widget for capturing sensitive text with masked display.
Signature
def PasswordInput(
label: str,
key: str = None,
hint: str = None,
required: bool = True,
full_width: bool = False,
lowercase_required: bool = False,
uppercase_required: bool = False,
special_required: bool = False,
digit_required: bool = False,
min_length: int = None,
max_length: int = None,
size: int = None,
pattern: str = None,
autocomplete: str = None,
placeholder: str = None,
disabled: bool = False,
secret: bool = False,
errors: Union[List[str], str] = None
)
Parameters
Name | Description | Type | Default |
---|---|---|---|
label (required) | Text label displayed above the input. | str | None |
key | Identifier for the widget, defaults to label if not provided. | str | None |
hint | Help text displayed below the input. | str | None |
required | Whether the input must be filled before proceeding. | bool | True |
full_width | Whether the input should take up the full width of its container. | bool | False |
lowercase_required | Whether the input must contain at least one lowercase letter. | bool | False |
uppercase_required | Whether the input must contain at least one uppercase letter. | bool | False |
special_required | Whether the input must contain at least one special character. | bool | False |
digit_required | Whether the input must contain at least one digit. | bool | False |
min_length | Minimum number of characters required. | int | None |
max_length | Maximum number of characters allowed. | int | None |
size | Size of the input. | int | None |
pattern | Regular expression pattern for input validation. | str | None |
autocomplete | Autocomplete attribute for the input. | str | None |
placeholder | Placeholder text displayed when the input is empty. | str | None |
disabled | Whether the input is non-interactive. | bool | False |
secret | Whether the input is a secret (e.g., for passwords). | bool | False |
errors | Pre-defined validation error messages to display. | Union[List[str], str] | None |