Skip to content

Commit 21f02d3

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: Make clear when the options min and max are required
2 parents 07fd43a + 81bcaa7 commit 21f02d3

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
@@ -173,9 +173,11 @@ max
173173

174174
**type**: ``integer``
175175

176-
This required option is the "max" length value. Validation will fail if
176+
This option is the "max" length value. Validation will fail if
177177
the given value's length is **greater** than this max value.
178178

179+
This option is required when the ``min`` option is not defined.
180+
179181
maxMessage
180182
~~~~~~~~~~
181183

@@ -198,9 +200,11 @@ min
198200

199201
**type**: ``integer``
200202

201-
This required option is the "min" length value. Validation will fail if
203+
This option is the "min" length value. Validation will fail if
202204
the given value's length is **less** than this min value.
203205

206+
This option is required when the ``max`` option is not defined.
207+
204208
It is important to notice that NULL values and empty strings are considered
205209
valid no matter if the constraint required a minimum length. Validators
206210
are triggered only if the value is not blank.

0 commit comments

Comments
 (0)