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
Copy file name to clipboardExpand all lines: docs/content/reference/field.md
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -435,6 +435,36 @@ item_type:
435
435
MULTI_LINE_FIELD_DESCRIPTION
436
436
```
437
437
438
+
### `min_size`
439
+
Array only. Validates that the array has at least this many items in it.
440
+
441
+
In many cases, it is better to avoid client-side validation. See [Best practices: Validation]({{< ref "/best-practices/validation" >}}) for more information.
442
+
443
+
Example:
444
+
445
+
```yaml
446
+
- name: 'fieldOne'
447
+
type: Array
448
+
item_type:
449
+
type: String
450
+
min_size: 1
451
+
```
452
+
453
+
### `max_size`
454
+
Array only. Validates that the array has at most this many items in it.
455
+
456
+
In many cases, it is better to avoid client-side validation. See [Best practices: Validation]({{< ref "/best-practices/validation" >}}) for more information.
457
+
458
+
Example:
459
+
460
+
```yaml
461
+
- name: 'fieldOne'
462
+
type: Array
463
+
item_type:
464
+
type: String
465
+
max_size: 10
466
+
```
467
+
438
468
### `item_validation`
439
469
Array only. Controls the [`ValidateFunc`](https://developer.hashicorp.com/terraform/plugin/sdkv2/schemas/schema-behaviors#validatefunc)
440
470
used to validate individual items in the array. Behaves like [`validation`]({{<ref "#validation" >}}).
0 commit comments