Skip to content

Commit e07d7e7

Browse files
author
Bruno Vitorino
committed
Make clear when the options min and max are required
1 parent 6026cd7 commit e07d7e7

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
@@ -168,9 +168,11 @@ max
168168

169169
**type**: ``integer``
170170

171-
This required option is the "max" length value. Validation will fail if
171+
This option is the "max" length value. Validation will fail if
172172
the given value's length is **greater** than this max value.
173173

174+
This option is required when the ``min`` option is not defined.
175+
174176
maxMessage
175177
~~~~~~~~~~
176178

@@ -193,9 +195,11 @@ min
193195

194196
**type**: ``integer``
195197

196-
This required option is the "min" length value. Validation will fail if
198+
This option is the "min" length value. Validation will fail if
197199
the given value's length is **less** than this min value.
198200

201+
This option is required when the ``max`` option is not defined.
202+
199203
It is important to notice that NULL values and empty strings are considered
200204
valid no matter if the constraint required a minimum length. Validators
201205
are triggered only if the value is not blank.

0 commit comments

Comments
 (0)