diff --git a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php b/src/Illuminate/Validation/Concerns/ValidatesAttributes.php index 4b11c28f5e30..df5bb1fc2005 100644 --- a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php +++ b/src/Illuminate/Validation/Concerns/ValidatesAttributes.php @@ -1743,7 +1743,7 @@ public function validatePresentIf($attribute, $value, $parameters) [$values, $other] = $this->parseDependentRuleParameters($parameters); if (in_array($other, $values, is_bool($other) || is_null($other))) { - return $this->validatePresent($attribute, $value, $parameters); + return $this->validatePresent($attribute, $value); } return true; @@ -1764,7 +1764,7 @@ public function validatePresentUnless($attribute, $value, $parameters) [$values, $other] = $this->parseDependentRuleParameters($parameters); if (! in_array($other, $values, is_bool($other) || is_null($other))) { - return $this->validatePresent($attribute, $value, $parameters); + return $this->validatePresent($attribute, $value); } return true; @@ -1783,7 +1783,7 @@ public function validatePresentWith($attribute, $value, $parameters) $this->requireParameterCount(1, $parameters, 'present_with'); if (Arr::hasAny($this->data, $parameters)) { - return $this->validatePresent($attribute, $value, $parameters); + return $this->validatePresent($attribute, $value); } return true; @@ -1802,7 +1802,7 @@ public function validatePresentWithAll($attribute, $value, $parameters) $this->requireParameterCount(1, $parameters, 'present_with_all'); if (Arr::has($this->data, $parameters)) { - return $this->validatePresent($attribute, $value, $parameters); + return $this->validatePresent($attribute, $value); } return true; diff --git a/src/Illuminate/Validation/Validator.php b/src/Illuminate/Validation/Validator.php index 0629287d6e8a..ef74c14af8f4 100755 --- a/src/Illuminate/Validation/Validator.php +++ b/src/Illuminate/Validation/Validator.php @@ -256,6 +256,10 @@ class Validator implements ValidatorContract 'RequiredWithAll', 'RequiredWithout', 'RequiredWithoutAll', + 'PresentIf', + 'PresentUnless', + 'PresentWith', + 'PresentWithAll', 'Prohibited', 'ProhibitedIf', 'ProhibitedUnless',