我是cakephp的新手,並且正在嘗試在其中構建應用程序。我有一些文本框,我希望對它們進行驗證。我在cakephp.org中關注cakephp教程並做了以下工作,但我無法看到textfields附近的驗證消息。以下是我的代碼:cakephp驗證郵件不顯示
CTP:
<?php echo $this->Form->text('Rideoffer.PickFrom',
array('class' => 'address-text',
'value' => $dropFrom)); ?>
型號:
public $validate = array(
'PickFrom' => array(
'rule' => 'notEmpty',
'message' => 'Cannot leave this field blank.'
),
//'PickFrom' => 'notEmpty',
'DropAt' => 'notEmpty',
// 'born' => 'date'
);
這裏我收到錯了嗎?我如何解決它?
參考http://book.cakephp.org/2.0/en/index.html – 2013-03-05 05:17:30