are you validating during a store or an update? if you're validating during a store, the created_at value is not being passed as a form variable. you can add it as hidden form field then this "should" work
'expected_at' => 'date|after:created_at',
if it's during an update, you need to get the record to check against.
$opportunity= Opportunity::find($id); $rules['expected_at'] = 'date|after:'.$opportunity->created_at;
then that "should" work. according to docs
The dates will be passed into the PHP strtotime function.
so it should support datetime format.
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us