Support the ongoing development of Laravel.io →
Validation Forms Database
Last updated 2 years ago.
0

Hi Jk,

<input type="date" name="date1">

Will give this desired format ("Y-m-d") as default,

and you need just this rules ['required', 'date',].

On your Model:

$protect $cast = [
    'yourVariable' => 'datetime',
    'yourOtherVariable' => 'datetime',
];

And also you do not need this DB query, create a Reservation model that extends eloquent.

Finally on your question you can create a Custom Validation Rules whenever you feel needed. Just click in this link and the explanation is fairly simple.

Last updated 5 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.