fix(validation): use int|string for Livewire numeric properties and remove nullable from API rules
This commit is contained in:
parent
15a98b52c9
commit
791aa10b3f
2 changed files with 9 additions and 9 deletions
|
|
@ -660,11 +660,11 @@ public function update_server(Request $request)
|
|||
'is_build_server' => 'boolean|nullable',
|
||||
'instant_validate' => 'boolean|nullable',
|
||||
'proxy_type' => 'string|nullable',
|
||||
'concurrent_builds' => 'integer|nullable|min:1',
|
||||
'dynamic_timeout' => 'integer|nullable|min:1',
|
||||
'deployment_queue_limit' => 'integer|nullable|min:1',
|
||||
'server_disk_usage_notification_threshold' => 'integer|nullable|min:1|max:100',
|
||||
'server_disk_usage_check_frequency' => 'string|nullable',
|
||||
'concurrent_builds' => 'integer|min:1',
|
||||
'dynamic_timeout' => 'integer|min:1',
|
||||
'deployment_queue_limit' => 'integer|min:1',
|
||||
'server_disk_usage_notification_threshold' => 'integer|min:1|max:100',
|
||||
'server_disk_usage_check_frequency' => 'string',
|
||||
]);
|
||||
|
||||
$extraFields = array_diff(array_keys($request->all()), $allowedFields);
|
||||
|
|
|
|||
|
|
@ -16,16 +16,16 @@ class Advanced extends Component
|
|||
public string $serverDiskUsageCheckFrequency = '0 23 * * *';
|
||||
|
||||
#[Validate(['required', 'integer', 'min:1', 'max:99'])]
|
||||
public ?int $serverDiskUsageNotificationThreshold = 50;
|
||||
public int|string $serverDiskUsageNotificationThreshold = 50;
|
||||
|
||||
#[Validate(['required', 'integer', 'min:1'])]
|
||||
public ?int $concurrentBuilds = 1;
|
||||
public int|string $concurrentBuilds = 1;
|
||||
|
||||
#[Validate(['required', 'integer', 'min:1'])]
|
||||
public ?int $dynamicTimeout = 1;
|
||||
public int|string $dynamicTimeout = 1;
|
||||
|
||||
#[Validate(['required', 'integer', 'min:1'])]
|
||||
public ?int $deploymentQueueLimit = 25;
|
||||
public int|string $deploymentQueueLimit = 25;
|
||||
|
||||
public function mount(string $server_uuid)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue