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/dev/validation-types.txt
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,9 @@ When an attribute has a data type defined with the **type** attribute, you can u
66
66
| **list** | **valid_values** -- list of valid values, checked for every element in the list |
67
67
| | **create_empty** (bool) -- replace None value with an empty list |
68
68
| | **empty** (bool, default: True) -- can the list be empty? |
69
-
| | **make_list** (bool) -- force non-scalar values to become single-element lists |
69
+
| | **make_list** (bool) -- force non-scalar values to become single-element lists[^SLE] |
70
+
| | **min_length** (int) -- minimum list length |
71
+
| | **max_length** (int) -- maximum list length |
70
72
| | **split_lines** (bool) -- split multi-line string value into multiple list elements |
71
73
| | **_subtype** -- validate values as belonging to the specified subtype |
72
74
| **dict** | **create_empty** (bool) -- replace None value with an empty dictionary |
@@ -82,6 +84,8 @@ When an attribute has a data type defined with the **type** attribute, you can u
82
84
| **ipv4** | **use** -- [the use of IPv4 address/prefix](validation-ip-address) |
83
85
| **ipv6** | **use** -- [the use of IPv6 address/prefix](validation-ip-address) |
84
86
87
+
[^SLE]: Scalar values are automatically converted to single-element lists
88
+
85
89
**Notes**
86
90
* **_keys** attribute is rarely used in dictionary definitions. Using a [shortcut definition](validation-shortcut-type) is much better. See [examples](validation-definition-examples) for a counterexample.
0 commit comments