From 0f2230543dd8d44e680bfd2408de36f65e11c7e6 Mon Sep 17 00:00:00 2001 From: Bruno Vitorino Date: Mon, 7 Oct 2019 15:24:15 +0200 Subject: [PATCH] Make clear when the options min and max are required --- reference/constraints/Length.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/reference/constraints/Length.rst b/reference/constraints/Length.rst index 1a349b99449..34da26d5b09 100644 --- a/reference/constraints/Length.rst +++ b/reference/constraints/Length.rst @@ -122,9 +122,11 @@ min **type**: ``integer`` -This required option is the "min" length value. Validation will fail if +This option is the "min" length value. Validation will fail if the given value's length is **less** than this min value. +This option is required when the ``max`` option is not defined. + It is important to notice that NULL values and empty strings are considered valid no matter if the constraint required a minimum length. Validators are triggered only if the value is not blank. @@ -134,9 +136,11 @@ max **type**: ``integer`` -This required option is the "max" length value. Validation will fail if +This option is the "max" length value. Validation will fail if the given value's length is **greater** than this max value. +This option is required when the ``min`` option is not defined. + charset ~~~~~~~