33 lines
966 B
PHP
33 lines
966 B
PHP
<?php
|
||
|
||
namespace App\Http\Requests;
|
||
|
||
use Illuminate\Foundation\Http\FormRequest;
|
||
|
||
class StoreDomainRequest extends FormRequest
|
||
{
|
||
/**
|
||
* Determine if the user is authorized to make this request.
|
||
*/
|
||
public function authorize(): bool
|
||
{
|
||
return false;
|
||
}
|
||
|
||
/**
|
||
* Get the validation rules that apply to the request.
|
||
*
|
||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||
*/
|
||
public function rules(): array
|
||
{
|
||
return [
|
||
'domain' => ['required','string','max:191','unique:domains,domain'],
|
||
'total_quota_mb' => ['required','integer','min:1'], // 0 = unlimitiert wäre riskant – ich empfehle >0
|
||
// 'default_mailbox_quota_mb' => ['nullable','integer','min:1','lte:total_quota_mb'],
|
||
'is_active' => ['sometimes','boolean'],
|
||
'is_system' => ['sometimes','boolean'],
|
||
];
|
||
}
|
||
}
|