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
Handle more collision scenarios on NestedArrayFormatter
See #1668 for more info.
There is a new test "Deep name collision" on AllOfTest that
exemplifies the kind of collision this change solves.
Some extra `__root__` keys needed to be added to a select few
other scenarios for consistency.
Copy file name to clipboardExpand all lines: tests/feature/Validators/AttributesTest.php
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -60,8 +60,9 @@
60
60
'__root__' => '`Respect\Validation\Test\Stubs\WithAttributes { +$name="" +$birthdate="not a date" #$phone="not a phone number" + ... }` must pass the rules',
61
61
'name' => '`.name` must be defined',
62
62
'birthdate' => [
63
-
'`.birthdate` must be a valid date in the format "2005-12-30"',
64
-
'For comparison with now, `.birthdate` must be a valid datetime',
63
+
'__root__' => '`.birthdate` must pass all the rules',
64
+
0 => '`.birthdate` must be a valid date in the format "2005-12-30"',
65
+
1 => 'For comparison with now, `.birthdate` must be a valid datetime',
65
66
],
66
67
'phone' => '`.phone` must be a valid telephone number or must be null',
67
68
'email' => '`.email` must be a valid email address or must be null',
0 commit comments