我有一个模型预约,想要在模型中定义规则功能以在提交之前验证这些条件
validation conditions:
start_time < end_time
end_time > start_time
start_time != end_time
public function rules()
{
return array(
array('name, client_name, service_id, app_date, st_time, ed_time, appointment_status', 'required'),
);
}
约会表有以下字段
id(PK),title,client_name,app_date,start_time,end_time,status