Date time format for laravel validation
$request->validate([
'start_date' => 'date_format:d/m/Y',
'end_date' => 'date_format:d/m/Y'
]);
Date time format for laravel validation
$request->validate([
'start_date' => 'date_format:d/m/Y',
'end_date' => 'date_format:d/m/Y'
]);
laravel date validation
'dob' => 'required|date_format:Y-m-d|after_or_equal:1920-01-01'
validate time in laravel
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
}
in laravel date duration validation rule
[
'from' => ['required', 'date_format:Y-m-d', 'before_or_equal:to'],
'to' => ['required', 'date_format:Y-m-d']
]
//@sujay
in laravel date duration validation rule
public function store(Request $request)
{
$todayDate = date('m/d/Y');
$request->validate([
'name' => 'required',
'email' => 'required|email',
'start_date' => 'date_format:m/d/Y|after_or_equal:'.$todayDate
]);
}
//@sujay
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us