diff options
| author | Asko Nomm <asko@bien.ee> | 2022-02-27 19:56:09 +0100 |
|---|---|---|
| committer | Asko Nomm <asko@bien.ee> | 2022-02-27 19:56:09 +0100 |
| commit | 96bef73aa85e49e821328d162e963f80e675fa35 (patch) | |
| tree | e9350febf2f37825db7386a0990a5c8800cf5746 /src/Hird.php | |
| parent | 2e3271ff54a2f161c9924f926e68ec5dc15857d8 (diff) | |
Pass down to the validate method
Diffstat (limited to 'src/Hird.php')
| -rw-r--r-- | src/Hird.php | 4 |
1 files changed, 2 insertions, 2 deletions
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); } } |
