wowowowowo
This commit is contained in:
29
app/Http/Requests/ImportEnvironmentVariablesRequest.php
Normal file
29
app/Http/Requests/ImportEnvironmentVariablesRequest.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ImportEnvironmentVariablesRequest 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 [
|
||||
'contents' => ['required', 'string', 'max:20000'],
|
||||
'overridable' => ['sometimes', 'boolean'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Enums\RepositoryType;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class StoreApplicationRequest extends FormRequest
|
||||
{
|
||||
@@ -23,6 +25,8 @@ class StoreApplicationRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'source_provider_id' => ['nullable', 'integer', 'exists:source_providers,id'],
|
||||
'repository_type' => ['required', Rule::enum(RepositoryType::class)],
|
||||
'repository_url' => ['required', 'string', 'max:255', 'regex:/^(git@[^:]+:.+|ssh:\/\/.+)$/i'],
|
||||
'default_branch' => ['required', 'string', 'max:255', 'regex:/^[A-Za-z0-9._\/-]+$/'],
|
||||
'environment_name' => ['required', 'string', 'max:255'],
|
||||
|
||||
@@ -29,6 +29,9 @@ class StoreEnvironmentAttachmentRequest extends FormRequest
|
||||
'name' => ['nullable', 'string', 'max:255'],
|
||||
'env_prefix' => ['nullable', 'string', 'max:32', 'regex:/^[A-Z][A-Z0-9_]*$/'],
|
||||
'is_primary' => ['boolean'],
|
||||
'domain' => ['nullable', 'string', 'max:255'],
|
||||
'path_prefix' => ['nullable', 'string', 'max:255'],
|
||||
'tls_enabled' => ['boolean'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
28
app/Http/Requests/StoreEnvironmentDeploymentRequest.php
Normal file
28
app/Http/Requests/StoreEnvironmentDeploymentRequest.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreEnvironmentDeploymentRequest 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 [
|
||||
'target_commit' => ['nullable', 'string', 'size:40', 'regex:/^[a-fA-F0-9]{40}$/'],
|
||||
];
|
||||
}
|
||||
}
|
||||
30
app/Http/Requests/StoreEnvironmentRequest.php
Normal file
30
app/Http/Requests/StoreEnvironmentRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreEnvironmentRequest 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 [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'branch' => ['required', 'string', 'max:255', 'regex:/^[A-Za-z0-9._\/-]+$/'],
|
||||
'php_version' => ['required', 'string', 'max:20'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@ class StoreEnvironmentVariableRequest extends FormRequest
|
||||
return [
|
||||
'key' => ['required', 'string', 'max:255', 'regex:/^[A-Z][A-Z0-9_]*$/'],
|
||||
'value' => ['nullable', 'string'],
|
||||
'overridable' => ['boolean'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
32
app/Http/Requests/StoreGatewayRouteRequest.php
Normal file
32
app/Http/Requests/StoreGatewayRouteRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreGatewayRouteRequest 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 [
|
||||
'service_id' => ['required', 'integer', 'exists:services,id'],
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'domain' => ['required', 'string', 'max:255'],
|
||||
'path_prefix' => ['required', 'string', 'max:255', 'regex:/^\//'],
|
||||
'tls_enabled' => ['boolean'],
|
||||
];
|
||||
}
|
||||
}
|
||||
31
app/Http/Requests/StoreOrganisationMemberRequest.php
Normal file
31
app/Http/Requests/StoreOrganisationMemberRequest.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Enums\OrganisationRole;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class StoreOrganisationMemberRequest 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 [
|
||||
'email' => ['required', 'email', 'max:255'],
|
||||
'role' => ['required', Rule::enum(OrganisationRole::class)],
|
||||
];
|
||||
}
|
||||
}
|
||||
32
app/Http/Requests/StoreProviderRequest.php
Normal file
32
app/Http/Requests/StoreProviderRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Enums\ProviderType;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class StoreProviderRequest 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 [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'type' => ['required', Rule::enum(ProviderType::class)],
|
||||
'token' => ['required', 'string', 'max:2000'],
|
||||
];
|
||||
}
|
||||
}
|
||||
32
app/Http/Requests/StoreServerFirewallRuleRequest.php
Normal file
32
app/Http/Requests/StoreServerFirewallRuleRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Enums\FirewallRuleType;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class StoreServerFirewallRuleRequest 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 [
|
||||
'type' => ['required', Rule::enum(FirewallRuleType::class)],
|
||||
'ports' => ['required', 'string', 'max:50', 'regex:/^[A-Za-z0-9:\/,-]+$/'],
|
||||
'from' => ['nullable', 'string', 'max:255', 'regex:/^[A-Fa-f0-9:.\/-]+$/'],
|
||||
];
|
||||
}
|
||||
}
|
||||
32
app/Http/Requests/StoreServiceSliceRequest.php
Normal file
32
app/Http/Requests/StoreServiceSliceRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreServiceSliceRequest 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 [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'type' => ['required', 'string', 'max:255'],
|
||||
'environment_id' => ['nullable', 'integer'],
|
||||
'status' => ['required', 'string', 'max:255'],
|
||||
'config' => ['nullable', 'string'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,7 @@ class StoreServiceUpdateRequest extends FormRequest
|
||||
return [
|
||||
'image_digest' => ['required', 'string', 'starts_with:sha256:'],
|
||||
'backup_requested' => ['sometimes', 'boolean'],
|
||||
'confirmation' => ['required', 'string'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
34
app/Http/Requests/UpdateApplicationRequest.php
Normal file
34
app/Http/Requests/UpdateApplicationRequest.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Enums\RepositoryType;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateApplicationRequest 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 [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'source_provider_id' => ['nullable', 'integer', 'exists:source_providers,id'],
|
||||
'repository_type' => ['required', Rule::enum(RepositoryType::class)],
|
||||
'repository_url' => ['required', 'string', 'max:255', 'regex:/^(git@[^:]+:.+|ssh:\/\/.+)$/i'],
|
||||
'default_branch' => ['required', 'string', 'max:255', 'regex:/^[A-Za-z0-9._\/-]+$/'],
|
||||
];
|
||||
}
|
||||
}
|
||||
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'],
|
||||
];
|
||||
}
|
||||
}
|
||||
42
app/Http/Requests/UpdateEnvironmentRequest.php
Normal file
42
app/Http/Requests/UpdateEnvironmentRequest.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Enums\BuildStrategy;
|
||||
use App\Enums\SchedulerMode;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateEnvironmentRequest 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 [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'branch' => ['required', 'string', 'max:255', 'regex:/^[A-Za-z0-9._\/-]+$/'],
|
||||
'status' => ['required', 'string', 'max:255'],
|
||||
'scheduler_enabled' => ['boolean'],
|
||||
'scheduler_target_service_id' => ['nullable', 'integer'],
|
||||
'scheduler_mode' => ['required', Rule::enum(SchedulerMode::class)],
|
||||
'build_strategy' => ['required', Rule::enum(BuildStrategy::class)],
|
||||
'php_version' => ['nullable', 'string', 'max:20'],
|
||||
'document_root' => ['nullable', 'string', 'max:255'],
|
||||
'health_path' => ['nullable', 'string', 'max:255'],
|
||||
'js_package_manager' => ['nullable', 'string', 'max:50'],
|
||||
'js_build_command' => ['nullable', 'string', 'max:255'],
|
||||
];
|
||||
}
|
||||
}
|
||||
30
app/Http/Requests/UpdateEnvironmentVariableRequest.php
Normal file
30
app/Http/Requests/UpdateEnvironmentVariableRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UpdateEnvironmentVariableRequest 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 [
|
||||
'key' => ['required', 'string', 'max:255', 'regex:/^[A-Z][A-Z0-9_]*$/'],
|
||||
'value' => ['nullable', 'string'],
|
||||
'overridable' => ['boolean'],
|
||||
];
|
||||
}
|
||||
}
|
||||
31
app/Http/Requests/UpdateGatewayRouteRequest.php
Normal file
31
app/Http/Requests/UpdateGatewayRouteRequest.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UpdateGatewayRouteRequest 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 [
|
||||
'domain' => ['required', 'string', 'max:255'],
|
||||
'path_prefix' => ['required', 'string', 'max:255', 'regex:/^\//'],
|
||||
'tls_enabled' => ['boolean'],
|
||||
'certificate_status' => ['nullable', 'string', 'max:255'],
|
||||
];
|
||||
}
|
||||
}
|
||||
30
app/Http/Requests/UpdateOrganisationInvitationRequest.php
Normal file
30
app/Http/Requests/UpdateOrganisationInvitationRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Enums\OrganisationRole;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateOrganisationInvitationRequest 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(OrganisationRole::class)],
|
||||
];
|
||||
}
|
||||
}
|
||||
30
app/Http/Requests/UpdateOrganisationMemberRequest.php
Normal file
30
app/Http/Requests/UpdateOrganisationMemberRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Enums\OrganisationRole;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateOrganisationMemberRequest 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(OrganisationRole::class)],
|
||||
];
|
||||
}
|
||||
}
|
||||
34
app/Http/Requests/UpdateRegistryRequest.php
Normal file
34
app/Http/Requests/UpdateRegistryRequest.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Enums\RegistryType;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateRegistryRequest 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 [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'type' => ['required', Rule::enum(RegistryType::class)],
|
||||
'url' => ['required', 'string', 'max:255'],
|
||||
'username' => ['nullable', 'string', 'max:255'],
|
||||
'password' => ['nullable', 'string', 'max:255'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Enums\DeployPolicy;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateServiceRequest extends FormRequest
|
||||
{
|
||||
@@ -26,6 +28,16 @@ class UpdateServiceRequest extends FormRequest
|
||||
'desired_replicas' => ['required', 'integer', 'min:0', 'max:25'],
|
||||
'default_cpu_limit' => ['nullable', 'numeric', 'min:0.125', 'max:64'],
|
||||
'default_memory_limit_mb' => ['nullable', 'integer', 'min:64', 'max:1048576'],
|
||||
'deploy_policy' => ['nullable', Rule::enum(DeployPolicy::class)],
|
||||
'version_track' => ['nullable', 'string', 'max:255'],
|
||||
'available_image_digest' => ['nullable', 'string', 'max:255'],
|
||||
'process_roles' => ['nullable', 'string', 'max:255'],
|
||||
'migration_mode' => ['nullable', 'string', 'max:255'],
|
||||
'migration_timing' => ['nullable', 'string', 'max:255'],
|
||||
'migration_command' => ['nullable', 'string', 'max:255'],
|
||||
'health_path' => ['nullable', 'string', 'max:255'],
|
||||
'backup_enabled' => ['sometimes', 'boolean'],
|
||||
'backup_command' => ['nullable', 'string', 'max:1000'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
32
app/Http/Requests/UpdateSourceProviderRequest.php
Normal file
32
app/Http/Requests/UpdateSourceProviderRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Enums\SourceProviderType;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateSourceProviderRequest 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 [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'type' => ['required', Rule::enum(SourceProviderType::class)],
|
||||
'url' => ['nullable', 'string', 'max:255'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user