acceptCustom = $acceptCustom; } public function validate(string $attribute, mixed $value, \Closure $fail): void { if (CronExpression::isValidExpression($value)) { return; } if ($this->acceptCustom && $value === 'custom') { return; } $fail('Invalid frequency')->translate(); } }