-3

I want to improve my forms with jQuery Validation Engine. For more accessibility, I want to put the error in a tag below the input tag.

<input type="text" ... >
<p class="error">Error message</p>

Is it possible ?

Thank you !

4
  • 2
    Yes it is possible Commented Apr 4, 2017 at 6:44
  • 1
    Is the p tag already there or do you want to add it dynamicly? Commented Apr 4, 2017 at 6:44
  • 1
    Yes, see the errorPlacement setting: jqueryvalidation.org/validate/#errorplacement Commented Apr 4, 2017 at 6:45
  • Thank you guys ! Commented Apr 4, 2017 at 6:46

1 Answer 1

0

Yes you can do what you want, see here Its the jquery validation plugin allows you to customize your error messages.

eg.

var validator = $( "#myshowErrors" ).validate();
validator.showErrors({
  "firstname": "I know that your firstname is Pete, Pete!"
});

see this

Sign up to request clarification or add additional context in comments.

Comments

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.