在我的CodeIgniter模型中,其中一個字段是用於設置屬性租約範圍的leasestart和leaseend。我目前有類似於下面的東西。什麼是在日期時間設置規則的語法?或者就此事約會。將日期時間規則添加到codeigniter中的模型
public $rules = array(
'unitnum' => array(
'field' => 'unitnum',
'label' => 'UnitNum',
'rules' => 'trim|required|numeric|xss_clean'
),
'rent' => array(
'field' => 'rent',
'label' => 'Rent',
'rules' => 'trim|required|numeric|greater_than[0]|xss_clean'
),
'leasestart' => array(
'field' => 'leasestart',
'label' => 'LeaseStart',
'rules' => 'trim|required|????|xss_clean'
),
'leaseend' => array(
'field' => 'leaseend',
'label' => 'LeaseEnd',
'rules' => 'trim|required|????|xss_clean'
),
);
要檢查開始日期不大於結束日期和結束日期不等於和低於較輕開始日期是我的正確與否 – umefarooq