summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsko Nomm <asko@bien.ee>2022-02-27 19:56:09 +0100
committerAsko Nomm <asko@bien.ee>2022-02-27 19:56:09 +0100
commit96bef73aa85e49e821328d162e963f80e675fa35 (patch)
treee9350febf2f37825db7386a0990a5c8800cf5746
parent2e3271ff54a2f161c9924f926e68ec5dc15857d8 (diff)
Pass down to the validate method
-rw-r--r--src/Hird.php4
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);
}
}