feat(interface/input): minLength & maxLength option (#121)

* feat(interface/input): minLength & maxLength option

* Delete yarn.lock

* Fix Typescript
This commit is contained in:
Lockwood authored and GitHub committed 2023-05-09 00:20:56 +02:00
1 parent 6ce570cfae
commit cb58b4bc48
1 file changed
+4 -2
+4 -2
View File
@@ -47,6 +47,8 @@ Available properties per field type:
* disabled?: `boolean`
* default?: `string`
* password?: `boolean`
* min?: `number`
* max?: `number`
* number
* label: `string`
@@ -221,7 +223,7 @@ console.log(input, input[0], input[1])
```lua
local input = lib.inputDialog('Dialog title', {
{type = 'input', label = 'Text input', description = 'Some input description'},
{type = 'input', label = 'Text input', description = 'Some input description', required = true, min = 4, max = 16},
{type = 'number', label = 'Number input', description = 'Some number description', icon = 'hashtag'},
{type = 'checkbox', label = 'Simple checkbox'},
{type = 'color', label = 'Colour input', default = '#eb4034'},
@@ -247,7 +249,7 @@ This function is **asynchronous** requiring you to do a `.then` callback on the
```ts
const input = await lib.inputDialog('Police locker', [
{type: 'input', label: 'Text input', description: 'Some input description'},
{type: 'input', label: 'Text input', description: 'Some input description', required: true, min: 3, max: 16},
{type: 'number', label: 'Number input', description: 'Some number description', icon: 'hashtag'},
{type: 'checkbox', label: 'Simple checkbox'},
{type: 'color', label: 'Colour input', default: '#eb4034'},