0

I'm using jquery Validation. I am trying to control where the error message will appear.

How can i do that?

10x

1 Answer 1

1

You could use the errorPlacement method:

$("#myform").validate({
    errorPlacement: function(error, element) {
        error.appendTo(element.parent("td").next("td"));
    }
});
Sign up to request clarification or add additional context in comments.

2 Comments

this isn't in a table format . can i do that in a div with an id?
Of course you can. I just posted a sample which you could adapt to your scenario. You can append the error wherever you like.

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.