You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #35783 [Validator] Add the divisibleBy option to the Count constraint (fancyweb)
This PR was merged into the 5.1-dev branch.
Discussion
----------
[Validator] Add the divisibleBy option to the Count constraint
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | TODO
From my experience, it is sometimes useful to assert that the number of elements in a collection is a multiple of X.
Commits
-------
8dfb7b2 [Validator] Add the divisibleBy option to the Count constraint
Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ CHANGELOG
8
8
* added option `alpha3` to `Country` constraint
9
9
* allow to define a reusable set of constraints by extending the `Compound` constraint
10
10
* added `Sequentially` constraint, to sequentially validate a set of constraints (any violation raised will prevent further validation of the nested constraints)
11
+
* added the `divisibleBy` option to the `Count` constraint
thrownewMissingOptionsException(sprintf('Either option "min", "max" or "divisibleBy" must be given for constraint %s', __CLASS__), ['min', 'max', 'divisibleBy']);
0 commit comments