This effect contains a single error container for all validation
errors. Here it is
Styling the error container
The form itself uses this
external
stylesheet. We have added addional styling for the error message
container. Nothing special here.
The custom effect
Here is the custom effect. It is added
with $.tools.validator.addEffect method as described
in Making custom effects
section of the validator documentation. The effect takes the
container, makes it visible and adds the messages inside it. It is
only triggered upon form submission and not when fields are edited.
You need to place the script block after the
HTML code or you can alternatively use
jQuery's $(document).ready to execute the script as
soon as the webpage's Document Object Model (DOM) has been
loaded. Read more about that from
the User's
Manual.
Using the effect
Now we initialize the validator and also make a custom form
submission logic.