Documentation for the various options, including errorPlacement, are here http://docs.jquery.com/Plugins/Validation/validate#toptions
There are also various demos available, eg. the Remember The Milk Registration form, which uses errorPlacement: http://docs.jquery.com/Plugins/Validation#Demos Jörn 2008/8/19 PanPan <[EMAIL PROTECTED]>: > > Hi everyone, i'm having trouble with the jQuery Validate plugin. I > easily find how to validate my form, but i would like to specify > location for every error message the validate plug-in send. But i > don't find, i think it's withe the option "errorPlacement" but i don't > know how to use it exactly. > > Here is my code : > > $(document).ready(function(){ > $("#News").validate({ > rules: > { > TitleNews: {required: > true,minLength: > 10}, > IntroNews: {required: > false,minLength: > 150}, > ContentNews: {required: > true,minLength: 200}, > TagsNews: {required: > false,minLength: 5} > }, > messages: > { > TitleNews: > { required: "<img src=\"style/imgs/ > action_stop.gif\" alt=\"\" />Merci de rentrer un titre<img src=\"style/ > imgs/action_stop.gif\" alt=\"\" />", > minlength: "Votre > titre doit contenir au > moins 10 caractères !" > }, > IntroNews: {minlength: > "L'intro doit > contenir au moins 150 caractères !"}, > ContentNews: > { required: "Merci de rentrer le > contenu de votre news !", > minlength: "Le contenu > de votre news > doit être au moins de 200 caractères !" > }, > TagsNews: {minlength: "Le > contenu des > tags doit être d'au moins 5 caractères !"} > } > }); > }); > > And the HTML : > > <form action="toto.php" method="POST" name="News" id="News"> > <label for="TitleNews">Titre de la news*</label> > <input name="TitleNews" class="required" minlength="5" /> > <div id="TitleError"></div> > <br /> > <label>BBCode<br /><i>Pour l'intro.</i></label> > <div class="BoxToolbar"> > <div id="hautdroit"></div> > <div id="hautgauche"></div> > <div id="contenu"> > <?php AfficheToolbarBBCode("IntroNews") ;?> > </div> > <br /> > </div> > <label for="IntroNews">Intro de la news</label> > <textarea name="IntroNews" id="IntroNews" style="height: > 150px;"></textarea> > <div id="IntroError"><img src="style/imgs/action_stop.gif" > alt="" />Intro Error !! <img src="style/imgs/action_stop.gif" alt="" / >></div> > <br /> > <label>BBCode<br /><i>Pour le contenu.</i></label> > <div class="BoxToolbar"> > <div id="hautdroit"></div> > <div id="hautgauche"></div> > <div id="contenu"> > <?php AfficheToolbarBBCode("ContentNews") ;?> > </div> > <br /> > </div> > <label for="ContentNews">Contenu / suite de la news*</label> > <textarea name="ContentNews" id="ContentNews"></textarea> > <div id="ContentError"><img src="style/imgs/action_stop.gif" > alt="" />Contenu Error !! <img src="style/imgs/action_stop.gif" > alt="" /></div> > <br /> > <label for="Tags">Tags</label> > <input name="TagsNews"> > <div id="TagsError"><img src="style/imgs/action_stop.gif" > alt="" />Tags Error !! <img src="style/imgs/action_stop.gif" alt="" / >></div> > Entrer un ou plusieurs tags, separé par une virgule. <i>Les > tags sont des mots-clés utilisés pour décrire votre news. > Par exemple, si votre news contient des photos de plages > bretonnes, vous pouvez indiquer les tags suivants : > photo, plage, Bretagne.</i> > <br /> > <br /> > <div class="buttons"> > <a href="#"><img src="style/imgs/sauvegarde.jpg" alt="" /> > Sauvegarder</a> > </div> > <div class="LastSave"> > Derniere sauvegarde le 11 Novembre 2008 à 18h30. > </div> > <br /> > <br /> > <div class="buttons"> > <button type="submit"> > <img src="style/imgs/send.jpg" alt="" />Envoyer > </button> > </div> > <div class="buttons"> > <a href="#apercu" onclick="Apercu();"><img src="style/imgs/ > preview.jpg" alt="" />Apercu</a> > </div> > <br /><br /><br /> > </form> > > Thanks !!!! >