Skip to content

Commit 4070897

Browse files
committed
Update docs
1 parent 759e251 commit 4070897

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

docs/source/ref/forms.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,15 @@ Stores an :class:`~bson.objectid.ObjectId`.
101101
This is an optional argument which validates that the array reaches at
102102
least the stated length.
103103

104+
.. attribute:: size
105+
106+
This is an optional argument which validates that the array reaches at
107+
exactly the stated length.
108+
109+
.. note::
110+
Defining ``size`` along with ``max_length`` or ``min_length`` will raise an exception.
111+
Use ``size`` for fixed-length arrays and ``max_length`` / ``min_length`` for variable-length arrays with an upper or lower limit.
112+
104113
.. admonition:: User friendly forms
105114

106115
``SimpleArrayField`` is not particularly user friendly in most cases,

docs/source/ref/models/fields.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ Some MongoDB-specific fields are available in ``django_mongodb_backend.fields``.
7575

7676
This is an optional argument.
7777

78-
If passed, the array will have size as specified, validated
79-
only by forms.
78+
If passed, the array will have size as specified, validated by forms and model validation, but not enforced by the database.
8079

8180
.. note::
8281

0 commit comments

Comments
 (0)