1 $request->validate([
2 'start_date' => 'date_format:d/m/Y',
3 'end_date' => 'date_format:d/m/Y'
4 ]);
1[
2 'from' => ['required', 'date_format:Y-m-d', 'before_or_equal:to'],
3 'to' => ['required', 'date_format:Y-m-d']
4]
5//@sujay
1public function store(Request $request)
2
3{
4
5 $todayDate = date('m/d/Y');
6
7
8
9 $request->validate([
10
11 'name' => 'required',
12
13 'email' => 'required|email',
14
15 'start_date' => 'date_format:m/d/Y|after_or_equal:'.$todayDate
16
17 ]);
18}
19//@sujay