diff --git a/packages/forms/src/Components/Concerns/CanBeValidated.php b/packages/forms/src/Components/Concerns/CanBeValidated.php index abc9c35ae0..7128038fcf 100644 --- a/packages/forms/src/Components/Concerns/CanBeValidated.php +++ b/packages/forms/src/Components/Concerns/CanBeValidated.php @@ -339,9 +339,12 @@ trait CanBeValidated return $this->multiFieldValueComparisonRule('prohibited_unless', $statePath, $stateValues, $isStatePathAbsolute); } - public function prohibits(string | Closure $statePath, bool $isStatePathAbsolute = false): static + /** + * @param array | string | Closure $statePaths + */ + public function prohibits(array | string | Closure $statePaths, bool $isStatePathAbsolute = false): static { - return $this->fieldComparisonRule('prohibits', $statePath, $isStatePathAbsolute); + return $this->multiFieldComparisonRule('prohibits', $statePaths, $isStatePathAbsolute); } public function required(bool | Closure $condition = true): static