mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 18:20:48 +01:00
feat(contact): Add hCaptcha integration, Discord alert for contact
- Added hCaptcha validation to the contact form. - Integrated hCaptcha configuration in the application. - Implemented Discord alerts for new contact submissions with detailed content.
This commit is contained in:
@@ -11,10 +11,11 @@ class ContactSubmissionRequest extends FormRequest
|
||||
return [
|
||||
'name' => ['required', 'max:254'],
|
||||
'email' => ['required', 'email', 'max:254'],
|
||||
'discord' => ['nullable', 'min:2', 'max:34'],
|
||||
'discord' => ['nullable', 'min:2', 'max:35'],
|
||||
'category' => ['required', 'in:question,advertising,bug_report,feedback,other'],
|
||||
'subject' => ['required', 'max:254'],
|
||||
'message' => ['required', 'unique:contact_submissions', 'max:3500'],
|
||||
'h-captcha-response' => 'required|HCaptcha'
|
||||
];
|
||||
}
|
||||
|
||||
@@ -22,4 +23,14 @@ class ContactSubmissionRequest extends FormRequest
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'h-captcha-response.required' => 'Please verify that you are not a robot.',
|
||||
'h-captcha-response.h_captcha' => 'Failed to validate captcha.',
|
||||
'category.in' => 'Invalid category.',
|
||||
'message.unique' => 'You have already submitted this message.',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user