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(
4848 return $ str !== dot_array_search ($ otherField , $ data );
4949 }
5050
51- if (! array_key_exists ($ field , $ data )) {
51+ if (! array_key_exists ($ otherField , $ data )) {
5252 return false ;
5353 }
5454
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 )) {
5660 return false ;
5761 }
5862
@@ -281,11 +285,15 @@ public function matches(
281285 return $ str === dot_array_search ($ otherField , $ data );
282286 }
283287
284- if (! array_key_exists ($ field , $ data )) {
288+ if (! array_key_exists ($ otherField , $ data )) {
285289 return false ;
286290 }
287291
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 )) {
289297 return false ;
290298 }
291299
You can’t perform that action at this time.
0 commit comments