File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -25,16 +25,18 @@ Basic Usage
25
25
26
26
Suppose that you have a ``Place `` object with an ``$address `` property which
27
27
must match the following requirements:
28
- - it's a non-blank string
29
- - of at least 10 chars long
30
- - with a specific format
31
- - and geolocalizable using an external service
28
+
29
+ * it's a non-blank string
30
+ * of at least 10 chars long
31
+ * with a specific format
32
+ * and geolocalizable using an external service
32
33
33
34
In such situations, you may encounter three issues:
34
- - the ``Length `` or ``Regex `` constraints may fail hard with a :class: `Symfony\\ Component\\ Validator\\ Exception\\ UnexpectedValueException `
35
+
36
+ * the ``Length `` or ``Regex `` constraints may fail hard with a :class: `Symfony\\ Component\\ Validator\\ Exception\\ UnexpectedValueException `
35
37
exception if the actual value is not a string, as enforced by ``Type ``.
36
- - you may end with multiple error messages for the same property
37
- - you may perform a useless and heavy external call to geolocalize the address,
38
+ * you may end with multiple error messages for the same property
39
+ * you may perform a useless and heavy external call to geolocalize the address,
38
40
while the format isn't valid.
39
41
40
42
You can validate each of these constraints sequentially to solve these issues:
You can’t perform that action at this time.
0 commit comments