Validation 如何验证sfWidgetFormTextareaTinyMCE

Validation 如何验证sfWidgetFormTextareaTinyMCE,validation,symfony1,tinymce,symfony-1.4,symfony-forms,Validation,Symfony1,Tinymce,Symfony 1.4,Symfony Forms,我使用symfony 1.4.11。我还有下一个问题: $this->widgetSchema['en']['content'] = new sfWidgetFormTextareaTinyMCE(array( 'width' => 900, 'height' => 300, 'config' => 'theme_advanced_buttons1 : "cut, copy, paste, images, bold

我使用symfony 1.4.11。我还有下一个问题:

$this->widgetSchema['en']['content'] = new sfWidgetFormTextareaTinyMCE(array(
        'width'   => 900,
        'height'  => 300,
          'config' => 'theme_advanced_buttons1 : "cut, copy, paste, images, bold, italic, underline, justifyleft, justifycenter, justifyright , outdent, indent, bullist, numlist, undo, redo, link",
                       theme_advanced_buttons2 : "",            
                       theme_advanced_buttons3 : "",
                       theme_advanced_toolbar_location : "top",
                       theme_advanced_toolbar_align : "left",
                       theme_advanced_statusbar_location : "bottom",
                       theme_advanced_resizing: "false",
                       plugins: "images, paste",
                       '),array('class' => 'tinyMCE',)
    );  

我需要验证这个,我尝试了sfValidatorString,但是它不起作用

您没有正确设置您的小部件(可能既不是您的验证器也不是您的验证器)。如果要对小部件进行分组/嵌套,则需要在容器表单中嵌入另一个表单

编辑:

您可以创建一个包含“内容”小部件的新表单,并将其嵌入父表单中,如下所示:

$this->embedForm('en', new myContentForm());
或者,您可以这样添加小部件:

$this->widgetSchema['content_en'] = new sfWidgetFormTextareaTinyMCE(...);
具体细节取决于您的用例,我建议您在这里阅读表单:

(仍与1.4相关)