Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jeevamugunthan's avatar

unique date validation

hello everyone in my database i have columns called due_from and due_to. in this i update trem the field like

due_from=01-01-2020

due_to=01-06-2020

its fine now i want to validate this when i update new row if i set same duration or set like 01-04-2020 to 01-07-2020 it must be intimate its worng

if my new date is not in the limit of old date it will be update otherwise it fails how to do this

thanks in advance

0 likes
3 replies
jeevamugunthan's avatar

@sti3bas yeah i'm already know normal unique validation i want to know how to validate date of these two column's limit

sandersjj's avatar

As @sti3bas look in the documentation of custom validation rules. What have you tried already?

Please or to participate in this conversation.