wowowowowo
This commit is contained in:
36
app/Http/Requests/UpdateEnvironmentAttachmentRequest.php
Normal file
36
app/Http/Requests/UpdateEnvironmentAttachmentRequest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Enums\EnvironmentAttachmentRole;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateEnvironmentAttachmentRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'role' => ['required', Rule::enum(EnvironmentAttachmentRole::class)],
|
||||
'env_prefix' => ['nullable', 'string', 'max:255', 'regex:/^[A-Z][A-Z0-9_]*$/'],
|
||||
'is_primary' => ['boolean'],
|
||||
'domain' => ['nullable', 'string', 'max:255'],
|
||||
'path_prefix' => ['nullable', 'string', 'max:255'],
|
||||
'tls_enabled' => ['boolean'],
|
||||
'certificate_status' => ['nullable', 'string', 'max:255'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user