From 7562f64b16377714136e2d95b7e57a210122abbb Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Mon, 24 Feb 2020 20:50:21 +0100 Subject: [PATCH] [Validator] Fix list in Sequentially doc --- reference/constraints/Sequentially.rst | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/reference/constraints/Sequentially.rst b/reference/constraints/Sequentially.rst index 6d4ea2e164c..573a0a94a8e 100644 --- a/reference/constraints/Sequentially.rst +++ b/reference/constraints/Sequentially.rst @@ -25,17 +25,19 @@ Basic Usage Suppose that you have a ``Place`` object with an ``$address`` property which must match the following requirements: -- it's a non-blank string -- of at least 10 chars long -- with a specific format -- and geolocalizable using an external service + +* it's a non-blank string +* of at least 10 chars long +* with a specific format +* and geolocalizable using an external service In such situations, you may encounter three issues: -- the ``Length`` or ``Regex`` constraints may fail hard with a :class:`Symfony\\Component\\Validator\\Exception\\UnexpectedValueException` -exception if the actual value is not a string, as enforced by ``Type``. -- you may end with multiple error messages for the same property -- you may perform a useless and heavy external call to geolocalize the address, -while the format isn't valid. + +* the ``Length`` or ``Regex`` constraints may fail hard with a :class:`Symfony\\Component\\Validator\\Exception\\UnexpectedValueException` + exception if the actual value is not a string, as enforced by ``Type``. +* you may end with multiple error messages for the same property +* you may perform a useless and heavy external call to geolocalize the address, + while the format isn't valid. You can validate each of these constraints sequentially to solve these issues: