Skip to content

[11.x] Fix validator return fails if using different date formats#54350

Merged
taylorotwell merged 2 commits into
laravel:11.xfrom
mrvipchien:validate-date
Jan 26, 2025
Merged

[11.x] Fix validator return fails if using different date formats#54350
taylorotwell merged 2 commits into
laravel:11.xfrom
mrvipchien:validate-date

Conversation

@mrvipchien

@mrvipchien mrvipchien commented Jan 25, 2025

Copy link
Copy Markdown
Contributor

This PR fix the date validator if the validator has diff date formats like this:

[
    'from' => 'date|before:to|date_format:Y-m-d',
    'to' => 'date|date_format:Y-d-m|after:from',
]

checkDateTimeOrder() only use the first format.

@mrvipchien mrvipchien changed the title Fix validator return fails if using different formats [11.x] Fix validator return fails if using different formats Jan 25, 2025
@mrvipchien mrvipchien changed the title [11.x] Fix validator return fails if using different formats [11.x] Fix validator return fails if using different date formats Jan 25, 2025
@taylorotwell taylorotwell merged commit 48bdc07 into laravel:11.x Jan 26, 2025
@mrvipchien mrvipchien deleted the validate-date branch January 26, 2025 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants