Closes #39
This commit is contained in:
parent
d6f82c9df1
commit
c08266d81b
2 changed files with 6 additions and 29 deletions
|
|
@ -18,18 +18,6 @@ class ContactRequest extends FormRequest
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare the data for validation.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function prepareForValidation(): void
|
||||
{
|
||||
$this->merge([
|
||||
'terms' => $this->terms ? true : false
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
|
|
@ -42,7 +30,6 @@ class ContactRequest extends FormRequest
|
|||
'last_name' => 'required|min:1',
|
||||
'email' => 'required|email:rfc,spoof,dns,strict',
|
||||
'message' => 'required|string|min:10',
|
||||
'terms' => 'accepted',
|
||||
// phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed
|
||||
'g-recaptcha-response' => function (string $attribute, mixed $value, \Closure $fail) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -77,23 +77,13 @@
|
|||
</div>
|
||||
|
||||
<div class="mb-6 sm:col-span-3">
|
||||
<div class="check-standard text-sm mt-2 mr-6">
|
||||
<label for="terms" class="cursor-pointer text-weiss">
|
||||
<input type="checkbox" id="terms" name="terms" class="hidden">
|
||||
<span class="">
|
||||
{!! __('The information collected from this form is processed by the Data Controller to follow up on your contact request. To know about your rights, you can consult :start the Privacy Policy :end' ,[
|
||||
'start' => '<a href="' . route('privacy') . '" class="hover:underline">',
|
||||
'end' => '</a>'
|
||||
]) !!} *
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<span class="">
|
||||
{!! __('The information collected from this form is processed by the Data Controller to follow up on your contact request. To know about your rights, you can consult :start the Privacy Policy :end' ,[
|
||||
'start' => '<a href="' . route('privacy') . '" class="hover:underline">',
|
||||
'end' => '</a>'
|
||||
]) !!}
|
||||
</span>
|
||||
</div>
|
||||
@if ($errors->has('terms'))
|
||||
<div class="mb-6">
|
||||
<span class="text-red-600">{{ $errors->first('terms') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="mb-6 sm:col-span-3">
|
||||
<p>*{{ __('Required fields') }}</p>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue