Skip to content

Commit d13c76f

Browse files
committed
minor #16029 [Validator] [Validation] improve code for counting errors (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- [Validator] [Validation] improve code for counting errors Replaces #15983 Follows the discussion at symfony/symfony#43643 Commits ------- 3cae3a1 [Validation] improve code for counting errors
2 parents 0df6a11 + 3cae3a1 commit d13c76f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

validation/raw_values.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ address. From inside a controller, it looks like this::
2525
$emailConstraint
2626
);
2727

28-
if (0 === count($errors)) {
28+
if (!$errors->count()) {
2929
// ... this IS a valid email address, do something
3030
} else {
3131
// this is *not* a valid email address

0 commit comments

Comments
 (0)