admin管理员组文章数量:1122846
I am doing jquery validation on my form which works fine for all fields except for the wp_editor field.
I can set the content like so:
$("#recipe_content").html("<p>Hello</p>");
However validation itself does not work for that field:
$("#recipe-submission-form").validate({
rules: {
recipe_title: {
required: true,
minlength: 4,
},
featured_image: {
required: true,
},
recipe_content: { // DOES NOT WORK
required: true,
minlength: 20,
},
},
messages: {
recipe_title: {
required: "Please enter a recipe title.",
minlength: "The title must be at least 4 characters long.",
},
featured_image: {
required: "Please select a featured image.",
},
recipe_content: { // DOES NOT WORK
required: "Please enter the recipe content.",
minlength: "The content must be at least 20 characters long.",
},
},
});
本文标签: wp editorHow to jquery validate wpeditor
版权声明:本文标题:wp editor - How to jquery validate wp_editor? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736299065a1930365.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论