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
-`child` - A field instance that should be used for validating the objects in the list. If this argument is not provided then objects in the list will not be validated.
454
+
-`allow_empty` - Designates if empty lists are allowed.
454
455
-`min_length` - Validates that the list contains no fewer than this number of elements.
455
456
-`max_length` - Validates that the list contains no more than this number of elements.
456
457
@@ -471,9 +472,10 @@ We can now reuse our custom `StringListField` class throughout our application,
471
472
472
473
A field class that validates a dictionary of objects. The keys in `DictField` are always assumed to be string values.
-`child` - A field instance that should be used for validating the values in the dictionary. If this argument is not provided then values in the mapping will not be validated.
478
+
-`allow_empty` - Designates if empty dictionaries are allowed.
477
479
478
480
For example, to create a field that validates a mapping of strings to strings, you would write something like this:
479
481
@@ -488,9 +490,10 @@ You can also use the declarative style, as with `ListField`. For example:
488
490
489
491
A preconfigured `DictField` that is compatible with Django's postgres `HStoreField`.
-`child` - A field instance that is used for validating the values in the dictionary. The default child field accepts both empty strings and null values.
496
+
-`allow_empty` - Designates if empty dictionaries are allowed.
494
497
495
498
Note that the child field **must** be an instance of `CharField`, as the hstore extension stores values as strings.
0 commit comments