mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Add custom validation rule for 'steps' field
This commit is contained in:
parent
70aa749f28
commit
b3a58bc2b0
@ -14,6 +14,7 @@ namespace App\Http\Requests\Subscription;
|
||||
use App\Http\Requests\Request;
|
||||
use App\Models\Account;
|
||||
use App\Models\Subscription;
|
||||
use App\Rules\Subscriptions\Steps;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class StoreSubscriptionRequest extends Request
|
||||
@ -64,7 +65,7 @@ class StoreSubscriptionRequest extends Request
|
||||
'optional_recurring_product_ids' => 'bail|sometimes|nullable|string',
|
||||
'optional_product_ids' => 'bail|sometimes|nullable|string',
|
||||
'use_inventory_management' => 'bail|sometimes|bool',
|
||||
'steps' => 'sometimes', // @todo: build custom validation rule to ensure order & deps are right.
|
||||
'steps' => ['required', new Steps()],
|
||||
];
|
||||
|
||||
return $this->globalRules($rules);
|
||||
|
Loading…
x
Reference in New Issue
Block a user