saqueib
1160
3
Laravel

How to validate date after_or_equal to a column

Posted 1 year ago by saqueib

I have a post and it can have many revisions, revision has an effective_date column, I want to make sure when creating a new revision, effective dates must be >= the previous revision’s effective date.

I have tried using https://laravel.com/docs/5.5/validation#rule-after-or-equal

'effective_date' => 'date|nullable|after_or_equal:effective_date'

but it's not working for me, please help

Please sign in or create an account to participate in this conversation.