$year = $this->Form->input('exp_year', array(
'type' => 'date',
'maxYear' => date('Y', strtotime('+ 7 years')),
'minYear' => date('Y'),
'dateFormat' => 'Y',
'empty' => '----',
'label' => false
)
));
所以我试图获得到期年份,这是发布为:
'exp_year' => array(
'year' => '2016'
),
我试过了,但在这种情况下没有在文档中看到任何内容。
'exp_year' => array( 'year' => array(
'required' => array(
'rule' => array('numeric'),
'message' => 'Must select an expiration year'
)
)
),
'exp_year' => array( array(
'required' => array(
'rule' => array('numeric'),
'message' => 'Must select an expiration year'
)
)
),