summaryrefslogtreecommitdiff
path: root/src/Hird.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Hird.php')
-rw-r--r--src/Hird.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Hird.php b/src/Hird.php
index 956d7d6..eb96dd1 100644
--- a/src/Hird.php
+++ b/src/Hird.php
@@ -119,6 +119,17 @@ class Hird
}
/**
+ * Manually adds an error.
+ *
+ * @param string $error
+ * @return void
+ */
+ public function addError(string $error): void
+ {
+ $this->errors[] = $error;
+ }
+
+ /**
* Runs `$this->rules` over `$this->fields` to construct
* potential errors that will be stored as an array of strings
* in `$this->errors`.