This commit is contained in:
2026-02-03 15:31:29 +05:00
commit 326c677e8d
2800 changed files with 1489388 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<?php
namespace App\Http\Requests\Api\System\VersionManagement;
use App\Models\System\Settings\OS;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class CheckForUpdateRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
*/
public function rules(): array
{
return [
/** @example 1.0.0 */
'version' => ['required', 'string', 'max:255'],
/** @example ios */
'os' => ['required', 'string', 'max:255', Rule::in(array_keys(OS::apps()))],
];
}
/**
* Get the error messages for the defined validation rules.
*
* @return array<string, string>
*/
public function messages(): array
{
return [
'os.in' => sprintf('Valid sources: %s', implode(', ', array_keys(OS::apps()))),
];
}
}