Skip to content

Commit 61b645b

Browse files
committed
minor #12416 Make clear when the options are effectively required (ohvitorino)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #12416). Discussion ---------- Make clear when the options are effectively required In the documentation related to the `Count` constraint is not clear that the parameters `min` and `max` are dependent on each other to determine if they are required. This is an snipped taken from `\Symfony\Component\Validator\Constraints\Count` in package `symfony/validator` version 4.3.4 that states this dependency: ``` if (null === $this->min && null === $this->max) { throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), ['min', 'max']); } ``` Commits ------- 8534533 Make clear when the options are effectively required
2 parents 659546e + 8534533 commit 61b645b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reference/constraints/Count.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ max
119119

120120
**type**: ``integer``
121121

122-
This required option is the "max" count value. Validation will fail if the
122+
This option is the "max" count value and it is required if the **min** option has not been defined. Validation will fail if the
123123
given collection elements count is **greater** than this max value.
124124

125125
minMessage

0 commit comments

Comments
 (0)