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
Copy file name to clipboardExpand all lines: validation.md
+5-2
Original file line number
Diff line number
Diff line change
@@ -481,9 +481,12 @@ The field under validation must be a valid URL according to the `checkdnsrr` PHP
481
481
<aname="rule-after"></a>
482
482
#### after:_date_
483
483
484
-
The field under validation must be a value after a given date. The dates will be passed into the `strtotime` PHP function. You can also pass another field here:
484
+
The field under validation must be a value after a given date. The dates will be passed into the `strtotime` PHP function:
485
485
486
486
'start_date' => 'required|date|after:tomorrow'
487
+
488
+
Instead of passing a date string to be evaluated by `strtotime`, you may specify another field to compare against the date:
489
+
487
490
'finish_date' => 'required|date|after:start_date'
488
491
489
492
<aname="rule-alpha"></a>
@@ -534,7 +537,7 @@ The field under validation must be a valid date according to the `strtotime` PHP
534
537
<aname="rule-date-format"></a>
535
538
#### date_format:_format_
536
539
537
-
The field under validation must match the given _format_. The format will be evaluated using the PHP `date_parse_from_format` function. _Note:_You should use either `date` or `date_format`- not both.
540
+
The field under validation must match the given _format_. The format will be evaluated using the PHP `date_parse_from_format` function. You should use **either**`date` or `date_format`when validating a field, not both.
0 commit comments