Skip to content

Commit 3cae3a1

Browse files
[Validation] improve code for counting errors
1 parent 0df6a11 commit 3cae3a1

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)