Files
UNIT3D/app/Http/Requests/Staff/StoreMassPrivateMessageRequest.php
HDVinnie 094f64ed46 refactor: mass private message system
- Dedicated CRUD controller
- Allow selected groups only
- Old Mass action controller will be moved to own Mass validate users controller in separate pr
- closes #4690
2025-05-06 08:37:54 -04:00

59 lines
1.4 KiB
PHP

<?php
declare(strict_types=1);
/**
* NOTICE OF LICENSE.
*
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
* The details is bundled with this project in the file LICENSE.txt.
*
* @project UNIT3D Community Edition
*
* @author Roardom <roardom@protonmail.com>
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
*/
namespace App\Http\Requests\Staff;
use Illuminate\Foundation\Http\FormRequest;
class StoreMassPrivateMessageRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'group_ids' => [
'required',
'array'
],
'group_ids.*' => [
'exists:groups,id'
],
'subject' => [
'required',
'string',
'max:255',
],
'message' => [
'required',
'string',
'max:65536',
],
];
}
}