We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 795febe commit 9919dccCopy full SHA for 9919dcc
components/validator.rst
@@ -60,7 +60,7 @@ If you have lots of validation errors, you can filter them by error code::
60
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
61
62
$violations = $validator->validate(...);
63
- if (count($violations->findByCodes(UniqueEntity::NOT_UNIQUE_ERROR))) {
+ if (0 !== count($violations->findByCodes(UniqueEntity::NOT_UNIQUE_ERROR))) {
64
// handle this specific error (display some message, send an email, etc.)
65
}
66
0 commit comments