Thanks :) Got some other help from the author: An additional filter method:
$.validator.addMethod("strippedminlength", function(value, element, param) { return $(value).text().length >= param }, $.format("Please enter at least {0} characters")); and a class using this method: class="{required:true,strippedminlength:5}" That works great :) Diego A. schrieb: > That depends on how the validation is being performed. > Just find the line in the code that says: > if(s.length<5){ ... > and change it to: > if(s.replace(/\<[\s\S]+\>/gi,'').length<5){ ... > > this code: > .replace(/\<[\s\S]+\>/gi,'') > ...will remove anything within < and >, then you can check if the > actual text is longer than 5 chars, without any code > > On Jan 16, 10:47 am, psy* <[EMAIL PROTECTED]> wrote: >> Ok thanks, I got it to work properly with fckeditor now (with >> initialization and check)! Thanks again for your nice and fast help! >> >> But I have one more question: Do you know if it's possible to strip html >> tags when checking for the length of the typed in content because when I >> type in let's say 2 chars, than fckeditor will add the "<p>" and "</p>" >> tag around it and so the check won't cause the error to type in at least >> 5 chars ... Do you know how to fix that? >> >> Thanks! >> >> Diego A. schrieb: >> >>> OH, I see. FCKEditor doesn't update when you click the submit button. >>> You have to add an onclick event to the submit button to make sure >>> FCKEditor has updated the textarea. >>> Download the FCKEditor plugin, use it to initialize the FCKEditor then >>> use the $.fck.update() method. >>> ie.: <input type="submit" onclick="$.fck.update()" >>> On Jan 16, 10:28 am, "Diego A." <[EMAIL PROTECTED]> wrote: >>>> Are you the same person with 2 different logins? >>>> I don't get a javascript error, I get a validation error: >>>> "Bitte gebe einen Inhalt ein (mindestens 5 Zeichen)" >>>> ...which according to Google translate means: >>>> "Please give a content (at least 5 characters)" >>>> So what exactly is the problem? >>>> On Jan 15, 7:21 pm, psy* <[EMAIL PROTECTED]> wrote: >>>>> Hello, >>>>> why not just try it out. For that I did a test page and the "tutorial" >>>>> how to behave to see what I mean ... >>>>> 1) insert sth into the textarea from fckeditor >>>>> 2) click on submit button -> the error occurs that you haven't entered >>>>> at least 5 chars even though I/you have ... >>>>> 3) focus the textarea and than again click the submit button -> error >>>>> goes away and it works as it should ... >>>>> and no, I have no ajax submit! >>>>> I dunno what's the problem ... it's weird :( >>>>> thanks! >>>>> Diego A. schrieb: >>>>>> You say "the error occurs". What is "the error"? >>>>>> That's probably why people haven't replied to help. >>>>>> When you need help, it "helps" to be as clear and concise as possible. >>>>>> Anyway, I assume the problem is that you're trying to submit the >>>>>> contents of FCKEditor via ajax. This is not possible without >>>>>> explicitly updating the value of the textarea with the contents of the >>>>>> FCKEditor instance it points to. >>>>>> I think you need this: >>>>>> http://www.fyneworks.com/jquery/FCKEditor/ >>>>>> NOTE: >>>>>> the jQuery FCKEditor Plugin intercepts the ajaxSubmit function of the >>>>>> form plugin and explicitly updates the value of the textarea to be >>>>>> submitted. >>>>>> On Jan 15, 1:05 pm, KnoxBaby <[EMAIL PROTECTED]> wrote: >>>>>>> Can anybody help me out? Thanks! >>>>>>> On 7 Jan., 14:01, KnoxBaby <[EMAIL PROTECTED]> wrote: >>>>>>>> Hello, >>>>>>>> look at this page: >>>>>>>> http://www.jahlabs.de/jquery/test2/ >>>>>>>> I'm using validaiton plugin to validate the form, but there is the >>>>>>>> following weird behaviour: >>>>>>>> When I write something to the textbox and click on submit, the error >>>>>>>> occurs that I have to insert at least 5 characters (even though I have >>>>>>>> written more than this). Then I click in the textbox and without doin >>>>>>>> anything there, I click directly again the submit button and it works >>>>>>>> without any error message... >>>>>>>> What's wrong with it? >>>>>>>> thanks! > > >