Files
Discount-Bandit/app/Http/Requests/StoreProductRequest.php
Cybrarist c5095d1f9b start building dashboard with widgets
add global search hotkey
add community stores where users can import/export stores from new repository
fix media markt 404 on crawling
add currency resource, so users can modify the rate without the need for API
add new '*' in case there are multiple fields in schema
add basic code for plugin support to test it in production, shouldn't affect anything
add warning message if ntfy is added without topic
2026-01-27 21:38:58 +04:00

36 lines
917 B
PHP

<?php
namespace App\Http\Requests;
use App\Enums\ProductStatusEnum;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class StoreProductRequest 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 [
'name' => ['nullable', 'string'],
'status' => ['required', Rule::enum(ProductStatusEnum::class)],
'is_favourite' => ['required', 'boolean'],
'snoozed_until' => ['nullable', 'date'],
'remove_link_if_out_of_stock_for_x_days' => ['nullable', 'integer'],
];
}
}