From a0ffdb49dd47346ea2e4c89f3c5032ad074783fa Mon Sep 17 00:00:00 2001 From: W0rma Date: Mon, 16 Mar 2020 11:15:08 +0100 Subject: [PATCH] consider "allowEmptyString" option in example --- reference/constraints/Length.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reference/constraints/Length.rst b/reference/constraints/Length.rst index b27f43ffbf1..22af53381a8 100644 --- a/reference/constraints/Length.rst +++ b/reference/constraints/Length.rst @@ -42,7 +42,8 @@ and "50", you might add the following: * min = 2, * max = 50, * minMessage = "Your first name must be at least {{ limit }} characters long", - * maxMessage = "Your first name cannot be longer than {{ limit }} characters" + * maxMessage = "Your first name cannot be longer than {{ limit }} characters", + * allowEmptyString = false * ) */ protected $firstName; @@ -59,6 +60,7 @@ and "50", you might add the following: max: 50 minMessage: 'Your first name must be at least {{ limit }} characters long' maxMessage: 'Your first name cannot be longer than {{ limit }} characters' + allowEmptyString: false .. code-block:: xml @@ -79,6 +81,7 @@ and "50", you might add the following: + @@ -101,6 +104,7 @@ and "50", you might add the following: 'max' => 50, 'minMessage' => 'Your first name must be at least {{ limit }} characters long', 'maxMessage' => 'Your first name cannot be longer than {{ limit }} characters', + 'allowEmptyString' => false, ])); } }