Skip to content

Commit ee82c70

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents c87e8e6 + 6eb3819 commit ee82c70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Http/Controllers/Api/AssetsController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,8 +1141,8 @@ public function audit(Request $request, Asset $asset): JsonResponse
11411141
}
11421142
}
11431143

1144-
// Validate custom fields
1145-
Validator::make($asset->toArray(), $asset->customFieldValidationRules())->validate();
1144+
// Invoke the validation to see if the audit will complete successfully
1145+
$asset->setRules($asset->getRules() + $asset->customFieldValidationRules());
11461146

11471147
// Validate the rest of the data before we turn off the event dispatcher
11481148
if ($asset->isInvalid()) {

0 commit comments

Comments
 (0)