This commit is contained in:
2023-08-21 16:31:58 +08:00
parent 3c6943dfa1
commit 3ede2769d6
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -26,6 +26,6 @@ class Length implements ValidatorInterface
public function dispatch(object $class, string $name): bool
{
// TODO: Implement dispatch() method.
return mb_strlen($class->{$name}) === $this->value;
return mb_strlen((string)$class->{$name}) === $this->value;
}
}
+1 -1
View File
@@ -26,6 +26,6 @@ class MaxLength implements ValidatorInterface
public function dispatch(object $class, string $name): bool
{
// TODO: Implement dispatch() method.
return mb_strlen($class->{$name}) <= $this->value;
return mb_strlen((string)$class->{$name}) <= $this->value;
}
}
+1 -1
View File
@@ -26,6 +26,6 @@ class MinLength implements ValidatorInterface
public function dispatch(object $class, string $name): bool
{
// TODO: Implement dispatch() method.
return mb_strlen($class->{$name}) <= $this->value;
return mb_strlen((string)$class->{$name}) <= $this->value;
}
}