Quote OP:
It seems that Redactor is rendering the textarea as
display:none;
so the jQuery validate isn't getting triggered.
If that's all it is, you can simply enable that feature of the plugin.
By default, jQuery Validate will ignore all hidden fields. This can be reversed by setting the ignore
option to []
.
$("#add_cms").validate({
ignore: [], // <-- allows validation of all hidden fields
rules: {
page_content: "required"
},
messages: {
page_content: "Content can't be empty!"
}
});
See this answer: https://stackoverflow.com/a/8565769/594235