33 lines
997 B
PHP
33 lines
997 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Requests\PublicSite;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
final class PartnerInquiryRequest extends FormRequest
|
|
{
|
|
protected function prepareForValidation(): void
|
|
{
|
|
$email = $this->input('email');
|
|
|
|
$this->merge(['email' => is_string($email) ? mb_strtolower(trim($email)) : $email]);
|
|
}
|
|
|
|
/** @return array<string, array<int, string>> */
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'nome' => ['required', 'string', 'max:120'],
|
|
'empresa' => ['nullable', 'string', 'max:160'],
|
|
'email' => ['required', 'email', 'max:254'],
|
|
'atuacao' => ['required', 'string', 'max:120'],
|
|
'area_atendimento' => ['required', 'string', 'max:160'],
|
|
'mensagem' => ['required', 'string', 'max:3000'],
|
|
'portfolio_redes' => ['nullable', 'string', 'max:500'],
|
|
'telefone' => ['nullable', 'string', 'max:40'],
|
|
];
|
|
}
|
|
}
|