bridgev2/login: add default_value for user input fields

This commit is contained in:
Tulir Asokan 2026-01-10 20:53:44 +02:00
commit c69518ab3c
2 changed files with 6 additions and 1 deletions

View file

@ -190,6 +190,8 @@ type LoginInputDataField struct {
Name string `json:"name"`
// The description of the field shown to the user.
Description string `json:"description"`
// A default value that the client can pre-fill the field with.
DefaultValue string `json:"default_value,omitempty"`
// A regex pattern that the client can use to validate input client-side.
Pattern string `json:"pattern,omitempty"`
// For fields of type select, the valid options.

View file

@ -728,11 +728,14 @@ components:
description: A more detailed description of the field shown to the user.
examples:
- Include the country code with a +
default_value:
type: string
description: A default value that the client can pre-fill the field with.
pattern:
type: string
format: regex
description: A regular expression that the field value must match.
select:
options:
type: array
description: For fields of type select, the valid options.
items: