Skip to content

Commit 3994967

Browse files
author
Liran Cohen
committed
Omit archived fields from validation.
1 parent 4088727 commit 3994967

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Traits/HasCustomFields.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function customFields()
2828
*/
2929
public function validateCustomFields($fields)
3030
{
31-
$validationRules = $this->customFields->mapWithKeys(function ($field) {
31+
$validationRules = $this->customFields()->whereNull('archived_at')->get()->mapWithKeys(function ($field) {
3232
return ['field_' . $field->id => $field->validationRules];
3333
})->toArray();
3434

0 commit comments

Comments
 (0)