Taking this basic example of jQuery Validate (see link below), how can you instruct it to show the error messages inside the form elements, where possible (obviously checkboxes wouldn’t work)?
Taking this basic example of jQuery Validate (see link below), how can you instruct
Share
Obviously you’ll want to tailor it for your own form, but absolute positioning may help you here. For the example you cited:
[Truncated] markup:
CSS:
Of course, this approach does have one major drawback, and that is that the error label will hang above (and over) what the user is typing. On the jquery.com example, I had a red “Please enter at least 2 characters” message over the first letter of my name as I was typing. To remedy this, you’d want to do something like this: