I am using jquery validation plugin to display error message in the top instead instead of beside the labels. say, i have address , city, zip code ….if user don’t enter anything i have to display the error message at top in a div like ” please enter valid address” , “please enter valid city” etc…
how can I override the default behavior of the plugin …..any help will be appreciated …
thanks!
I am using jquery validation plugin to display error message in the top instead
Share
You can use
errorLabelContainerandwrapperoptions for this:errorLabelContainerdetermines where the error elements are added,wrapperdetermines what they’re wrapped in. In this case#someElementUpTopis a<ul>to append the<li>wrapped labels to…so clicking still goes to the correct element in the page that has the validation error. If you need another element above this, say a<div>that hides and shows appropriately when there are/aren’t errors, add aerrorContainer: "#someDiv"option as well.