From 96bef73aa85e49e821328d162e963f80e675fa35 Mon Sep 17 00:00:00 2001 From: Asko Nomm Date: Sun, 27 Feb 2022 19:56:09 +0100 Subject: Pass down to the validate method --- src/Hird.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Hird.php b/src/Hird.php index 273ff05..1671619 100644 --- a/src/Hird.php +++ b/src/Hird.php @@ -106,11 +106,11 @@ class Hird if (str_contains($item, ':')) { [$name, $modifier] = explode(':', $item); - if (!$this->validators[$name]->validate($value, $modifier)) { + if (!$this->validators[$name]->validate($field, $value, $modifier)) { $this->errors[] = $this->validators[$name]->composeError($field, $modifier); } } else { - if (!$this->validators[$item]->validate($value)) { + if (!$this->validators[$item]->validate($field, $value)) { $this->errors[] = $this->validators[$item]->composeError($field); } } -- cgit v1.2.3