From 3ee508987e69687ace968c967961b4f92894d8c1 Mon Sep 17 00:00:00 2001 From: Chris Van Patten Date: Tue, 5 Jan 2016 09:48:23 -0500 Subject: [PATCH] Pass $this->_fields to callbacks defined in addRule --- src/Valitron/Validator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Valitron/Validator.php b/src/Valitron/Validator.php index 7322357..6a48c56 100644 --- a/src/Valitron/Validator.php +++ b/src/Valitron/Validator.php @@ -885,7 +885,7 @@ class Validator $result = true; foreach ($values as $value) { - $result = $result && call_user_func($callback, $field, $value, $v['params']); + $result = $result && call_user_func($callback, $field, $value, $v['params'], $this->_fields); } if (!$result) {