33 lines
702 B
PHP
33 lines
702 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Requests\Api\V1;
|
|
|
|
use App\Enums\ApplicationStatus;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
/**
|
|
* What the inbox lets anyone change about a submission: nothing the sender
|
|
* wrote, only how it is being handled.
|
|
*/
|
|
class ApplicationRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'status' => ['sometimes', Rule::enum(ApplicationStatus::class)],
|
|
'notes' => ['sometimes', 'nullable', 'string', 'max:10000'],
|
|
];
|
|
}
|
|
}
|