|
@@ -119,7 +119,7 @@ |
|
|
block discarded – undo |
|
119
|
119
|
|
|
120
|
120
|
public function withValidator(Validator $validator) |
|
121
|
121
|
{ |
|
122
|
|
- $shouldValidatePoll = fn () => count(array_filter($this->input('poll.items.*.text', []))) >= 1; |
|
|
122
|
+ $shouldValidatePoll = fn() => count(array_filter($this->input('poll.items.*.text', []))) >= 1; |
|
123
|
123
|
|
|
124
|
124
|
$validator->sometimes('poll.items', ['min:2'], $shouldValidatePoll); |
|
125
|
125
|
$validator->sometimes('poll.items.*.text', ['required', 'string', 'max:200'], $shouldValidatePoll); |
Please login to merge, or discard this patch.