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

Commit 975652d

Browse files
committed
chore: parse line breaks and tab chars on error messages
1 parent 5d4e6c9 commit 975652d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Exception/ValidationException.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ private function formatValue(mixed $value): string
3838
}
3939

4040
if (\is_string($value)) {
41-
return $value;
41+
// Replace line breaks and tabs with single space
42+
return str_replace(["\n", "\r", "\t", "\v", "\x00"], ' ', $value);
4243
}
4344

4445
if (\is_resource($value)) {

0 commit comments

Comments
 (0)