We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 147fcfb + 3153bbb commit 0c820cbCopy full SHA for 0c820cb
app/Http/Requests/Traits/MayContainCustomFields.php
@@ -23,7 +23,7 @@ public function withValidator($validator)
23
return str_starts_with($attributes, '_snipeit_');
24
});
25
// if there are custom fields, find the one's that don't exist on the model's fieldset and add an error to the validator's error bag
26
- if (count($request_fields) > 0) {
+ if (count($request_fields) > 0 && $validator->errors()->isEmpty()) {
27
$request_fields->diff($asset_model?->fieldset?->fields?->pluck('db_column'))
28
->each(function ($request_field_name) use ($request_fields, $validator) {
29
if (CustomField::where('db_column', $request_field_name)->exists()) {
0 commit comments