summaryrefslogtreecommitdiff
path: root/src/Validators/LenValidator.php
diff options
context:
space:
mode:
authorAsko Nomm <asko@bien.ee>2022-02-27 19:54:19 +0100
committerAsko Nomm <asko@bien.ee>2022-02-27 19:54:19 +0100
commit2e3271ff54a2f161c9924f926e68ec5dc15857d8 (patch)
tree147488ecd0c0ba3f82c9df44daf099df6c18c5a7 /src/Validators/LenValidator.php
parent7cdfdc038778e7df7824f17a2c184d5bc5f08bcc (diff)
Make `validate` fn also be aware of the `$field`.
This enables the creation of more complex validators, such as `unique:posts` where the `$field` might be used to determine a column in the `posts` table.
Diffstat (limited to 'src/Validators/LenValidator.php')
-rw-r--r--src/Validators/LenValidator.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Validators/LenValidator.php b/src/Validators/LenValidator.php
index f47168a..c5a152b 100644
--- a/src/Validators/LenValidator.php
+++ b/src/Validators/LenValidator.php
@@ -18,7 +18,7 @@ class LenValidator implements Validator
* @param mixed $modifier
* @return boolean
*/
- public static function validate(mixed $value, mixed $modifier = null): bool
+ public static function validate(string $field, mixed $value, mixed $modifier = null): bool
{
// If no modifier present then this validator will always validate.
if (!$modifier) {