Update validation rules for remote activity logs (#4526)

This commit is contained in:
Lance Pioch 2022-11-06 17:42:48 -05:00 committed by GitHub
parent 9b218f2190
commit 4032481a4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,11 +17,11 @@ class ActivityEventRequest extends FormRequest
return [
'data' => ['required', 'array'],
'data.*' => ['array'],
'data.*.user' => ['present', 'uuid'],
'data.*.user' => ['sometimes', 'nullable', 'uuid'],
'data.*.server' => ['required', 'uuid'],
'data.*.event' => ['required', 'string'],
'data.*.metadata' => ['present', 'nullable', 'array'],
'data.*.ip' => ['present', 'ip'],
'data.*.ip' => ['sometimes', 'nullable', 'ip'],
'data.*.timestamp' => ['required', 'string'],
];
}