You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR breaks the validation of the field if another field plus a temporal offset is specified.
Steps To Reproduce
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
$app = require__DIR__.'/bootstrap/app.php';
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
useIlluminate\Support\Facades\Validator;
$data = [
'dt1' => '2020-01-01',
'dt2' => '2024-01-01',
];
$val = Validator::make($data, [
'dt1' => 'required|date',
'dt2' => 'required|date|after:dt1 +1 day',
]);
/** * It works in Laravel 10.42.0 * And throw exception "The dt2 field must be a date after dt1+1 day." in Laravel 10.43.0 */$val->validate();
Details:
Illuminate\Validation\ValidationException
The dt2 field must be a date after dt1+1 day.
at vendor/laravel/framework/src/Illuminate/Support/helpers.php:330
326▕ function throw_if($condition, $exception = 'RuntimeException', ...$parameters)
327▕ {
328▕ if ($condition) {
329▕ if (is_string($exception) && class_exists($exception)) {
➜ 330▕ $exception = new $exception(...$parameters);
331▕ }
332▕
333▕ throw is_string($exception) ? new RuntimeException($exception) : $exception;
334▕ }
The text was updated successfully, but these errors were encountered:
Laravel Version
10.43.0
PHP Version
8.1.0
Database Driver & Version
No response
Description
This PR breaks the validation of the field if another field plus a temporal offset is specified.
Steps To Reproduce
Details:
The text was updated successfully, but these errors were encountered: