2

Trying to run following validation code but jquery.validate.js fails. Did anyone experianced this? I'm using jquery 1.7.2. on Firefox 12.0. After further investigation of the problem I learned that the problem arises only when there are tinymce elements in the form.

<script>
$(document).ready(function() {
    $('#simple_form').validate();
});
</script>

Here's the error.

classes.split is not a function
classes && $.each(classes.split(' '), function() {
4
  • 1
    Could you create a jsfiddle please :) Commented Jun 11, 2012 at 14:07
  • The page is quite complex so I extracted the form and javascript for validation to jsfiddle. Unfortunately validation worked :/ Commented Jun 11, 2012 at 14:51
  • I narrowed down the issue. jquery.validate errors when I have tinymce boxes on the page. Commented Jun 11, 2012 at 15:20
  • glad to be of assistance haha :) Commented Jun 11, 2012 at 18:28

2 Answers 2

2

It turned out that jquery.tinymce.js I was using was a bit different than the one currently hosted on tinymce.com. Replacing that file solved the problem.

Sign up to request clarification or add additional context in comments.

Comments

1

Try this:

<script>
$(document).ready(function() {
    tinyMCE.triggerSave(true, true);
    $('#simple_form').validate();
});
</script>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.