$date_today = date('Y-m-d', strtotime(' -1 day'));
// -1, -2 depend on how back you want to go!!
$date_today = date("m/d/Y", strtotime($date_today));
return [
[
'alert_start_date', 'compare', 'compareValue' => $date_today,
'operator' => '>',
'message' => $attribute.'Alert Start Date Cannot be a date in the past'
],
];
2条答案
按热度按时间g9icjywg1#
这可能有效(需要添加到模型规则中)
u4dcyp6a2#