26 lines
578 B
PHP
26 lines
578 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class ValidateSelectionRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'x' => ['required', 'numeric'],
|
|
'y' => ['required', 'numeric'],
|
|
'w' => ['required', 'numeric', 'min:1'],
|
|
'h' => ['required', 'numeric', 'min:1'],
|
|
'offsetX' => ['nullable', 'numeric'],
|
|
'offsetY' => ['nullable', 'numeric'],
|
|
];
|
|
}
|
|
}
|