This commit is contained in:
2023-11-27 08:29:48 +10:00
parent c432b32d08
commit 0772010119
195 changed files with 7153 additions and 9787 deletions

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Http\Requests;
use App\Rules\Recaptcha;
class SubscriptionRequest extends BaseRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function postRules(): array
{
return [
'email' => 'required|email|unique:subscriptions',
// 'captcha_token' => [new Recaptcha()],
];
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function destroyRules(): array
{
return [
'email' => 'required|email',
// 'captcha_token' => [new Recaptcha()],
];
}
/**
* Get the custom error messages.
*
* @return array
*/
public function messages(): array
{
return [
'email.unique' => 'This email address has already subscribed',
];
}
}