Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/292.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在该模型中,在验证和执行失效后,添加了神秘的ul和li,并干扰了css_Php_Model View Controller_Cakephp_Cakephp 2.0 - Fatal编程技术网

Php 在该模型中,在验证和执行失效后,添加了神秘的ul和li,并干扰了css

Php 在该模型中,在验证和执行失效后,添加了神秘的ul和li,并干扰了css,php,model-view-controller,cakephp,cakephp-2.0,Php,Model View Controller,Cakephp,Cakephp 2.0,如果该条件变为无效,则忽略该条件 'test_field' => [ 'checkInList' => [ 'rule' => ['checkInList', 'test_field_list'], 'message' => 'Before change', 'allowEmpty' => false, ],

如果该条件变为无效,则忽略该条件


'test_field' => [
            'checkInList' => [
                'rule' => ['checkInList', 'test_field_list'],
                'message' => 'Before change',
                'allowEmpty' => false,
            ],
        ],

.........

  public function after Validate ()
   {
     $ this-> invalidate ('test_field','After change');
}
我只是想改变措辞

<div class = "error-message">
  <ul>
    <li class = "odd firstChild"> Before change </ li>
    <li class = "even lastChild"> After change </ li>
</ ul>

</ div>

    更改前 更改后
会的。 两者都将显示,ul和li将被添加,css也不会应用

验证后,如果不满足条件,我想用invalidate更改措辞

写作有什么问题吗