laravel validation date after today example; In this tutorial how to validate date after today date validation in laravel application.
Soluction 1:
In this example we use after and date just see the below.
public function store(Request $request)
{
$request->validate([
'date' => 'required| after:' . date('Y-m-d'), //solution
]);
}
Solution 2:
We can use after:yesterday validation for today date.
public function store(Request $request)
{
$request->validate([
'date' => 'required|after:yesterday', //solution
]);
}
I hope this example help you.