Skip to content

Commit 4ff8014

Browse files
authored
Fixed date validation not accepting relative dates
The data validation does not accept _any_ value that `strtotime` understands, as it does `date_parse` with `check_date` afterwards. There was an issue for this, but was closed, although I could reproduce it. https://github.com/laravel/docs/issues/2542 `app('validator')->make(['foo' => 'yesterday'], ['foo' => ['date']])->validate()`
1 parent 5bc8cf4 commit 4ff8014

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ The field under validation must have a matching field of `foo_confirmation`. For
666666
<a name="rule-date"></a>
667667
#### date
668668

669-
The field under validation must be a valid date according to the `strtotime` PHP function.
669+
The field under validation must be a valid non-relative date according to the `strtotime` PHP function.
670670

671671
<a name="rule-date-equals"></a>
672672
#### date_equals:_date_

0 commit comments

Comments
 (0)