update api register
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Voucher;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SaveVoucherLoginPageRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'enabled' => ['required', 'boolean'], 'title' => ['required', 'string', 'max:150'],
|
||||
'theme_color' => ['required', 'regex:/^#[0-9A-Fa-f]{6}$/'],
|
||||
'allowed_package_profile_ids' => ['nullable', 'array'],
|
||||
'allowed_package_profile_ids.*' => ['integer', 'exists:nas_package_profiles,id'],
|
||||
'settings' => ['nullable', 'array'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user