views:

39

answers:

1

Currently the jQuery Validation plugin is displaying an error by creating its own label tag, using the class error.

Is it possible for me to place a tag on the screen, and if there is an error have the error message injected into that tag?

+2  A: 

You can specify a container and a wrapper element e.g

$("#myform").validate({
   errorLabelContainer: "#messageBox",
   wrapper: "span",
   submitHandler: function() { alert("Submitted!") }
})

see the options in the help

redsquare