check(); } public function getMailToTest(): MailToTest { return $this->enum('template', MailToTest::class); } public function getToAddress(string $fullname): Address { return new Address( $this->string('to')->value(), $fullname ); } /** * Get the validation rules that apply to the request. */ public function rules(): array { return [ 'template' => ['required', Rule::enum(MailToTest::class)], 'to' => ['required', 'email:strict,rfc,spoof'], ]; } }