From dcc564931821b50fe8bf9a255c6dc22ca0817d4e Mon Sep 17 00:00:00 2001 From: James Spibey Date: Mon, 17 Dec 2012 11:33:38 +0000 Subject: [PATCH] validate_required_with fix --- laravel/validator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/laravel/validator.php b/laravel/validator.php index ab446860..94d691b5 100644 --- a/laravel/validator.php +++ b/laravel/validator.php @@ -269,8 +269,9 @@ protected function validate_required($attribute, $value) protected function validate_required_with($attribute, $value, $parameters) { $other = $parameters[0]; + $other_value = array_get($this->attributes, $other); - if ($this->validate_required($other, $this->attributes[$other])) + if ($this->validate_required($other, $other_value)) { return $this->validate_required($attribute, $value); }