diff --git a/learn/features/runbooks.mdx b/learn/features/runbooks.mdx index 4c8cf64..4fd3ceb 100644 --- a/learn/features/runbooks.mdx +++ b/learn/features/runbooks.mdx @@ -112,18 +112,26 @@ WHERE email = {{ .email | pattern "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$" }} ``` -### Parameter Functions +### Parameter Functions | Function | Description | Example | |----------|-------------|---------| | `description` | Help text for the input | `description "Customer ID"` | | `required` | Error message if empty | `required "This field is required"` | | `default` | Default value if not provided | `default "US"` | +| `placeholder` | Placeholder text shown inside the input | `placeholder "e.g. 12345"` | | `type` | Input type for UI | `type "number"` | | `pattern` | Regex validation | `pattern "^[0-9]+$"` | | `options` | Dropdown options | `options "active" "inactive"` | +| `order` | Integer that controls field order in the form | `order "1"` | +| `minlength` | Minimum character length | `minlength "3"` | +| `maxlength` | Maximum character length | `maxlength "100"` | +| `asenv` | Pass value as environment variable instead of inline | `asenv "API_KEY"` | | `squote` | Wrap value in single quotes | `squote` | | `dquote` | Wrap value in double quotes | `dquote` | +| `quotechar` | Wrap value with a custom character | `quotechar "$"` | +| `encodeb64` | Encode value as base64 | `encodeb64` | +| `decodeb64` | Decode a base64 value | `decodeb64` | ### Input Types @@ -134,6 +142,11 @@ WHERE email = {{ .email | `email` | Email validation | | `date` | Date picker | | `time` | Time picker | +| `tel` | Phone number input | +| `url` | URL input | +| `password` | Masked text input with show/hide toggle | +| `textarea` | Multi-line text input | +| `file` | File upload — value sent as base64 | | `select` | Dropdown (use with `options`) | --- diff --git a/setup/configuration/runbooks-configuration.mdx b/setup/configuration/runbooks-configuration.mdx index 1d1a4f8..01f8d81 100644 --- a/setup/configuration/runbooks-configuration.mdx +++ b/setup/configuration/runbooks-configuration.mdx @@ -217,6 +217,8 @@ The specifications supports the following fields: - url - email - select + - textarea + - password - file - required - if the this field is required - default - specifies a default value for an input if it’s empty @@ -277,6 +279,10 @@ The template engine has auxiliary functions which helps to build better and secu - `` - the type of the input (see supported fields for a list of types) - `placeholder ""` - used as attribute specification to client input validation - `` - the description of the placeholder +- `minlength ""` - minimum character length for the input + - `` - the minimum number of characters required +- `maxlength ""` - maximum character length for the input + - `` - the maximum number of characters allowed - `options "