Javascript 验证tinymceeditor的空字段
我正在尝试为tinymceeditor应用空字段验证,如下所示:Javascript 验证tinymceeditor的空字段,javascript,validation,Javascript,Validation,我正在尝试为tinymceeditor应用空字段验证,如下所示: <li> <label for="contents"><?php echo $this->__('Preparation Steps: ');?></label> <textarea class="description isfield_required8 tinymceeditor mcontent validate-alphanum " name="conte
<li>
<label for="contents"><?php echo $this->__('Preparation Steps: ');?></label>
<textarea class="description isfield_required8 tinymceeditor mcontent validate-alphanum " name="contents"><?php echo @$recipe?@$recipe->getContents():''; ?></textarea>
</li>
<script type="text/javascript">
Validation.add('isfield_required8', '<?php echo $hlp->__('Please fill the recipe Prpe step'); ?>', function(v) {
return !Validation.get('IsEmpty').test(v);
});
验证。添加('isfield_required8','',函数(v){
return!Validation.get('IsEmpty').test(v);
});
但它并没有显示任何关于空文件的警告。
代码正确吗