DATETIME -VALIERATION IN LARAVEL
return [
'deadline' => 'required|date_format:Y-m-d H:i:s|after_or_equal:today',
];
Basel Rabia
return [
'deadline' => 'required|date_format:Y-m-d H:i:s|after_or_equal:today',
];
'year' => 'required|digits:4|integer|min:1900|max:'.(date('Y')+1),
$request->validate([
'start_date' => 'date_format:d/m/Y',
'end_date' => 'date_format:d/m/Y'
]);
'dob' => 'required|date_format:Y-m-d|after_or_equal:1920-01-01'
public function store(Illuminate\Http\Request $request)
{
$this->validate($request, [
'time_start' => 'date_format:H:i',
'time_end' => 'date_format:H:i|after:time_start',
]);
// do other stuff
}
'day' => 'required|date',