0
我有这样一个验证规则,有产生验证错误消息将不会在形式展现一年
$validator->add('cc_expires',[
'checkExpiryDate'=>[
'rule'=>'checkExpiryDate',
'provider'=>'table',
'message'=>__('BS_INVALID_CC_EXPIRY_DATE')]]);
错误信息,但在这个$this->Form->year()
控制
echo $this->Form->year('cc_expires', [ 'options' => $year_option,'error' =>true]);
不会生成错误消息我要补充
<?php print_r($order->errors() ['cc_expires'] ['checkExpiryDate']);?>
打印出错误消息,这是丑陋的,
反正是有用于控制$this->Form->year()
打印出错误消息,谢谢