Browse Source

恢复namerule校验

kely 11 months ago
parent
commit
f0f4337b2a
1 changed files with 7 additions and 7 deletions
  1. 7 7
      app/Http/Requests/API/Task/CreateOrUpdateRequest.php

+ 7 - 7
app/Http/Requests/API/Task/CreateOrUpdateRequest.php

@@ -38,13 +38,13 @@ class CreateOrUpdateRequest extends FormRequest
             'requirement_id' => [
                 Rule::exists('requirements', 'id')->where($this->userCompanyWhere()),
             ],
-//            'naming_rule_id' => [
-//                Rule::when($this->get('naming_rule_id') > 0, [
-//                    Rule::exists('naming_rules', 'id')->whereIn('company_id', [
-//                        0, Auth::user()->company_id,
-//                    ]),
-//                ])
-//            ],
+            'naming_rule_id' => [
+                Rule::when($this->get('naming_rule_id') > 0, [
+                    Rule::exists('naming_rules', 'id')->whereIn('company_id', [
+                        0, Auth::user()->company_id,
+                    ]),
+                ])
+            ],
             'assign' => [
                 Rule::exists('users', 'id')->where($this->userCompanyWhere()),
             ],