mardi 22 décembre 2020

Validate Date time through laravel Validation

I'm trying to validate date time through Laravel Validation like this:

$this->validate($request,[
        'DateTime'=> 'required|after_or_equal:' . date('Y-m-d H:i:s'),
]);

I want to restrict the user if they enter date time greater than current date time but in my case date is being validated but i have to validate time also. Format of date time is 2020-12-23 17:40:00



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/34zV2Ch
via IFTTT

Aucun commentaire:

Enregistrer un commentaire