feat: surface expression validation errors when creating or updating rules

This commit is contained in:
Michael Thomas
2024-03-07 12:23:32 -05:00
parent b572c1dcd3
commit 438f602961
7 changed files with 58 additions and 14 deletions

View File

@@ -140,7 +140,7 @@ class UpdateRequest extends FormRequest
'triggers.*.stop_processing' => [new IsBoolean()],
'triggers.*.active' => [new IsBoolean()],
'actions.*.type' => 'required|in:'.implode(',', $validActions),
'actions.*.value' => 'required_if:actions.*.type,'.$contextActions.'|ruleActionValue',
'actions.*.value' => 'required_if:actions.*.type,'.$contextActions.'|ruleActionExpression|ruleActionValue',
'actions.*.stop_processing' => [new IsBoolean()],
'actions.*.active' => [new IsBoolean()],
'strict' => [new IsBoolean()],