S
S
sasha_jarvi2018-10-15 11:26:24
JavaScript
sasha_jarvi, 2018-10-15 11:26:24

How to display error messages with jQuery Validation under a specific element?

In jQuery Validation, by default, an error message is displayed below a field that has not been validated. How can I customize the output of an error message under another element - the Submit button?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sasha_jarvi, 2018-10-15
@sasha_jarvi

Solution found: add the following construct:

errorPlacement: function(error, element) {
    error.insertAfter(element);
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question