You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| default |`string`| no | Default value if no answer is provided; see the prefill option below for governing it's behaviour. |
67
-
| prefill |`'tab' \| 'editable'`| no | Defaults to `'tab'`. If set to `'tab'`, pressing `backspace` will clear the default and pressing `tab` will inline the value for edits; If set to `'editable'`, the default value will already be inlined to edit. |
68
-
| required |`boolean`| no | Defaults to `false`. If set to true, `undefined` (empty) will not be accepted for this. |
69
-
| transformer |`(string, { isFinal: boolean }) => string`| no | Transform/Format the raw value entered by the user. Once the prompt is completed, `isFinal` will be `true`. This function is purely visual, modify the answer in your code if needed. |
70
-
| validate |`string => boolean \| string \| Promise<boolean \| string>`| no | On submit, validate the filtered answered content. When returning a string, it'll be used as the error message displayed to the user. Note: returning a rejected promise, we'll assume a code error happened and crash. |
71
-
| theme |[See Theming](#Theming)| no | Customize look of the prompt. |
| default |`string`| no | Default value if no answer is provided; see the prefill option below for governing it's behaviour. |
67
+
| prefill |`'tab' \| 'editable'`| no | Defaults to `'tab'`. If set to `'tab'`, pressing `backspace` will clear the default and pressing `tab` will inline the value for edits; If set to `'editable'`, the default value will already be inlined to edit. |
68
+
| required |`boolean`| no | Defaults to `false`. If set to true, `undefined` (empty) will not be accepted for this. |
69
+
| transformer |`(string, { isFinal: boolean }) => string`| no | Transform/Format the raw value entered by the user. Once the prompt is completed, `isFinal` will be `true`. This function is purely visual, modify the answer in your code if needed. |
70
+
| validate |`string => boolean \| string \| Promise<boolean \| string>`| no | On submit, validate the filtered answered content. When returning a string, it'll be used as the error message displayed to the user. Note: returning a rejected promise, we'll assume a code error happened and crash. |
71
+
| pattern |`RegExp`| no | Regular expression to validate the input against. If the input doesn't match the pattern, validation will fail with the error message specified in `patternError`. |
72
+
| patternError |`string`| no | Error message to display when the input doesn't match the `pattern`. Defaults to `'Invalid input'`. |
73
+
| theme |[See Theming](#Theming)| no | Customize look of the prompt. |
0 commit comments