Skip to content

Commit

Permalink
fix validation error on mixed types
Browse files Browse the repository at this point in the history
  • Loading branch information
keithbrink committed Dec 12, 2024
1 parent 2af989f commit 3680d1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Data/Base/Validators/RuleValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Attribute;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Str;
use Illuminate\Translation\FileLoader;
use Illuminate\Translation\Translator;
use Illuminate\Validation\Factory;
Expand Down Expand Up @@ -35,7 +36,7 @@ public function validate(mixed $value): void
]);

if ($validator->fails()) {
throw new DataValidationException('Invalid value: ' . $value . ', errors: ' . implode(',', $validator->errors()->get('value')));
throw new DataValidationException('Invalid value: ' . Str::limit(var_export($value, true), 50) . ', errors: ' . implode(',', $validator->errors()->get('value')));
}
}
}

0 comments on commit 3680d1a

Please sign in to comment.