mailwolt/app/Http/Requests/StoreDomainRequest.php

33 lines
966 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?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'],
];
}
}