Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 87ba533

Browse files
committed
fix: use mb_check_encoding to validate charset
1 parent e650896 commit 87ba533

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Rule/Length.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function assert(mixed $value, ?string $name = null): void
8080
$value = ($this->normalizer)($value);
8181
}
8282

83-
if (!mb_detect_encoding($value, $this->charset)) {
83+
if (!mb_check_encoding($value, $this->charset)) {
8484
throw new LengthException(
8585
message: $this->charsetMessage,
8686
parameters: [

0 commit comments

Comments
 (0)