如果我使用$ this-> Form-> textarea(),验证不能在cake php中工作

the*_*com 2 php cakephp cakephp-1.3

我使用的验证工作($ this-> Form-> input)

<?php echo $this->Form->input('Car', array('type'=>'textarea','label'=>false, 'cols'=>'23', 'rows'=>'4'));?>
Run Code Online (Sandbox Code Playgroud)

如果我使用($ this-> Form-> textarea)验证不起作用

<?php echo $this->Form->textarea('Car', array('label'=>false, 'cols'=>'23', 'rows'=>'4'));?>
Run Code Online (Sandbox Code Playgroud)

但两行代码的输出相同

谁能告诉我为什么会这样?

dec*_*eze 7

验证仍然有效.什么是无效的是显示错误.

FormHelper::input做了很多工作,包括验证错误的输出.
FormHelper::textarea只输出textarea,仅此而已.您必须自己输出错误echo $this->Form->error('Car').