Files
roxane/app/Http/Requests/Forms/MembershipRequest.php

36 lines
1.0 KiB
PHP
Raw Permalink Normal View History

2025-10-24 14:09:54 +02:00
<?php
namespace App\Http\Requests\Forms;
use App\Rules\ValidCaptcha;
2025-10-24 14:09:54 +02:00
use Illuminate\Foundation\Http\FormRequest;
class MembershipRequest extends FormRequest
{
public function authorize(): bool
{
2025-10-26 00:16:25 +02:00
return true;
2025-10-24 14:09:54 +02:00
}
/**
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'lastname' => 'required|string|max:255',
'firstname' => 'required|string|max:255',
'email' => 'required|email|max:255',
'company' => 'nullable|string|max:255',
2025-10-24 14:09:54 +02:00
'address' => 'required|string|max:255',
'zipcode' => 'required|string|max:255',
'city' => 'required|string|max:255',
'phone1' => 'required|string|max:255',
'package' => 'required|string|max:255',
'amount' => 'required|numeric|min:0',
'cgu' => 'required|accepted',
'captcha' => ['required', new ValidCaptcha('captcha_membership')],
2025-10-24 14:09:54 +02:00
];
}
}