Skip to content

Commit 81bcaa7

Browse files
committed
Merge branch '3.4' into 4.3
* 3.4: Make clear when the options min and max are required
2 parents b3bd7e7 + 90b5e31 commit 81bcaa7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

reference/constraints/Length.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,11 @@ max
164164

165165
**type**: ``integer``
166166

167-
This required option is the "max" length value. Validation will fail if
167+
This option is the "max" length value. Validation will fail if
168168
the given value's length is **greater** than this max value.
169169

170+
This option is required when the ``min`` option is not defined.
171+
170172
maxMessage
171173
~~~~~~~~~~
172174

@@ -189,9 +191,11 @@ min
189191

190192
**type**: ``integer``
191193

192-
This required option is the "min" length value. Validation will fail if
194+
This option is the "min" length value. Validation will fail if
193195
the given value's length is **less** than this min value.
194196

197+
This option is required when the ``max`` option is not defined.
198+
195199
It is important to notice that NULL values and empty strings are considered
196200
valid no matter if the constraint required a minimum length. Validators
197201
are triggered only if the value is not blank.

0 commit comments

Comments
 (0)