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 e6d543a commit 251304eCopy full SHA for 251304e
validation/severity.rst
@@ -137,7 +137,7 @@ method. Each constraint exposes the attached payload as a public property::
137
// Symfony\Component\Validator\ConstraintViolation
138
$constraintViolation = ...;
139
$constraint = $constraintViolation->getConstraint();
140
- $severity = isset($constraint->payload['severity']) ? $constraint->payload['severity'] : null;
+ $severity = $constraint->payload['severity'] ?? null;
141
142
For example, you can leverage this to customize the ``form_errors`` block
143
so that the severity is added as an additional HTML class:
0 commit comments