Explorar o código

修复一对一关联关系Range表单使用验证规则判断异常问题

jqh %!s(int64=5) %!d(string=hai) anos
pai
achega
400ccc4ce2
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      src/Form/Concerns/HasFieldValidator.php

+ 4 - 3
src/Form/Concerns/HasFieldValidator.php

@@ -387,9 +387,10 @@ trait HasFieldValidator
                 if (! Arr::has($input, $column)) {
                     continue;
                 }
-                $input[$column.$key] = Arr::get($input, $column);
-                $rules[$column.$key] = $fieldRules;
-                $attributes[$column.$key] = "{$this->label}[$column]";
+                $k = $column.$key;
+                Arr::set($input, $k, Arr::get($input, $column));
+                $rules[$k] = $fieldRules;
+                $attributes[$k] = "{$this->label}[$column]";
             }
         }