Skip to content

Commit 0f22305

Browse files
author
Bruno Vitorino
committed
Make clear when the options min and max are required
1 parent dd0ec96 commit 0f22305

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
@@ -122,9 +122,11 @@ min
122122

123123
**type**: ``integer``
124124

125-
This required option is the "min" length value. Validation will fail if
125+
This option is the "min" length value. Validation will fail if
126126
the given value's length is **less** than this min value.
127127

128+
This option is required when the ``max`` option is not defined.
129+
128130
It is important to notice that NULL values and empty strings are considered
129131
valid no matter if the constraint required a minimum length. Validators
130132
are triggered only if the value is not blank.
@@ -134,9 +136,11 @@ max
134136

135137
**type**: ``integer``
136138

137-
This required option is the "max" length value. Validation will fail if
139+
This option is the "max" length value. Validation will fail if
138140
the given value's length is **greater** than this max value.
139141

142+
This option is required when the ``min`` option is not defined.
143+
140144
charset
141145
~~~~~~~
142146

0 commit comments

Comments
 (0)