使用validate.js验证nicEdit的textarea输入

问题描述

我在我的所有textarea字段中都使用niceEdit,以使用户能够格式化输入并提交。但是,由于我使用validate.js进行前端验证,因此在使用下面的代码以粗体格式验证nicEdit输入时遇到问题:

validate.js
-------------
description: {
         format: {
             pattern: "[A-Za-z0-9 ]+",flags: 'i',message:"This field must contain only letters and numbers"
         }
  }


nicEdit.js
------------
<script type="text/javascript">
    bkLib.onDomloaded(function() {
        new nicEditor({
            buttonList: [
                'bold','italic','underline','removeformat','left','center','right','justify','ol','ul','indent','outdent','hr'
            ]
        }).panelInstance('area1');
    });

将表格寄回(POST)后出现错误-“此字段只能包含字母或数字”。我相信我需要更改模式以验证HTML nicEdit在输入上所做的操作,即当我对文本应用粗体格式时,我的输入变成了文本。

任何帮助将不胜感激。非常感谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)