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.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ The dictionary-based approach allows in-depth validation of nested attributes, w
83
83
(dev-valid-data-types)=
84
84
## Valid Data Types
85
85
86
-
Validator recognizes standard Python data types (**str**, **int**, **bool**, **list** or **dict**) and the following networking-specific data types:
86
+
Validator recognizes standard Python data types (**str**, **int**, **float**, **bool**, **list** or **dict**) and the following networking-specific data types:
87
87
88
88
| Data type. | Meaning |
89
89
|----------------|---------|
@@ -102,6 +102,7 @@ Validator recognizes standard Python data types (**str**, **int**, **bool**, **l
102
102
|**prefix_str**| An IPv4 or IPv6 prefix |
103
103
|**rd**| Route distinguisher (ASN:ID or IP:ID) |
104
104
|**r_proto**| Routing protocol identifier |
105
+
|**time**| Time duration specified in seconds (`s`) or milliseconds (`ms`) |
105
106
106
107
The data type can be specified as a string (without additional parameters) or a dictionary with a **type** attribute (data type as a string) and other type-specific validation parameters.
107
108
@@ -145,6 +146,8 @@ When an attribute has a data type defined with the **type** attribute, you can u
145
146
||**_subtype** -- validate values as belonging to the specified subtype |
146
147
||**_keytype** -- validate keys as belonging to the specified scalar type |
147
148
||**_list_to_dict** -- [value can be specified as a list](validation-list-to-dict)|
149
+
|**float**|**min_value** -- minimum parameter value |
150
+
||**max_value** -- maximum parameter value |
148
151
|**id**|**max_length** -- maximum identifier length |
149
152
|**int**|**min_value** -- minimum parameter value |
0 commit comments