Neustrukturierung Customer / Lead / Booking Phase 2
This commit is contained in:
parent
313f0dbf4e
commit
6df9c401af
69 changed files with 3809 additions and 374 deletions
34
app/Http/Requests/Offer/SendOfferRequest.php
Normal file
34
app/Http/Requests/Offer/SendOfferRequest.php
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests\Offer;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SendOfferRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return $this->user() !== null;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'subject' => 'required|string|max:500',
|
||||
'body' => 'required|string|max:100000',
|
||||
'cc' => 'nullable|string|max:2000',
|
||||
'bcc' => 'nullable|string|max:2000',
|
||||
'reply_to' => 'nullable|email|max:255',
|
||||
'expires_at' => 'nullable|date|after:now',
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'subject.required' => 'Bitte einen Betreff angeben.',
|
||||
'body.required' => 'Bitte den E-Mail-Text angeben.',
|
||||
'expires_at.after' => 'Ablaufdatum muss in der Zukunft liegen.',
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue