feat(Contact & membership forms update with their notification)
All checks were successful
Deploy Roxane to Preprod / deploy (push) Successful in 26h10m46s

This commit is contained in:
2026-04-07 18:06:20 +02:00
parent ca464e8e06
commit c848a8b47f
16 changed files with 602 additions and 517 deletions

View File

@@ -2,21 +2,17 @@
namespace App\Http\Requests\Forms;
use App\Rules\ValidCaptcha;
use Illuminate\Foundation\Http\FormRequest;
class ContactRequest 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
@@ -25,9 +21,10 @@ class ContactRequest extends FormRequest
'lastname' => 'required|string|max:255',
'firstname' => 'required|string|max:255',
'email' => 'required|email|max:255',
'address' => 'string|max:255',
'address' => 'nullable|string|max:255',
'subject' => 'required|string|max:255',
'message' => 'required|string',
'captcha' => ['required', new ValidCaptcha('captcha_contact')],
];
}
}

View File

@@ -2,39 +2,34 @@
namespace App\Http\Requests\Forms;
use App\Rules\ValidCaptcha;
use Illuminate\Foundation\Http\FormRequest;
class MembershipRequest 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 [
// Member
'lastname' => 'required|string|max:255',
'firstname' => 'required|string|max:255',
'email' => 'required|email|max:255',
'company' => 'string|max:255',
'company' => 'nullable|string|max:255',
'address' => 'required|string|max:255',
'zipcode' => 'required|string|max:255',
'city' => 'required|string|max:255',
'phone1' => 'required|string|max:255',
// Membership
'package' => 'required|string|max:255',
'amount' => 'required|string|max:255',
'amount' => 'required|numeric|min:0',
'cgu' => 'required|accepted',
'captcha' => ['required', new ValidCaptcha('captcha_membership')],
];
}
}