File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
system/Validation/StrictRules Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -48,11 +48,15 @@ public function differs(
48
48
return $ str !== dot_array_search ($ otherField , $ data );
49
49
}
50
50
51
- if (! array_key_exists ($ field , $ data )) {
51
+ if (! array_key_exists ($ otherField , $ data )) {
52
52
return false ;
53
53
}
54
54
55
- if (! array_key_exists ($ otherField , $ data )) {
55
+ if (str_contains ($ field , '. ' )) {
56
+ if (! ArrayHelper::dotKeyExists ($ field , $ data )) {
57
+ return false ;
58
+ }
59
+ } elseif (! array_key_exists ($ field , $ data )) {
56
60
return false ;
57
61
}
58
62
@@ -281,11 +285,15 @@ public function matches(
281
285
return $ str === dot_array_search ($ otherField , $ data );
282
286
}
283
287
284
- if (! array_key_exists ($ field , $ data )) {
288
+ if (! array_key_exists ($ otherField , $ data )) {
285
289
return false ;
286
290
}
287
291
288
- if (! array_key_exists ($ otherField , $ data )) {
292
+ if (str_contains ($ field , '. ' )) {
293
+ if (! ArrayHelper::dotKeyExists ($ field , $ data )) {
294
+ return false ;
295
+ }
296
+ } elseif (! array_key_exists ($ field , $ data )) {
289
297
return false ;
290
298
}
291
299
You can’t perform that action at this time.
0 commit comments