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, ])); } }