1 $request->validate([
2 'start_date' => 'date_format:d/m/Y',
3 'end_date' => 'date_format:d/m/Y'
4 ]);
1public function store(Illuminate\Http\Request $request)
2{
3 $this->validate($request, [
4 'time_start' => 'date_format:H:i',
5 'time_end' => 'date_format:H:i|after:time_start',
6 ]);
7
8 // do other stuff
9}
1 @if ($errors->any())
2 @foreach ($errors->all() as $error)
3 <div>{{$error}}</div>
4 @endforeach
5 @endif
6
1[
2 'from' => ['required', 'date_format:Y-m-d', 'before_or_equal:to'],
3 'to' => ['required', 'date_format:Y-m-d']
4]
5//@sujay