JavaScript
Include the jQuery Library 1.7 or later and the Guardian Plugin File:
Initialize Guardian:
$(document).ready(function() { $('#example').guardian(); });
CSS (optional)
HTML
A form tag must be included and all inputs must be within the form. In Guardian now the novalidate
attribute is added to the form tag during initialization. This attribute prevents the browser's native validation from activating.
Guardian uses input attributes to determine which inputs to validate and how to validate them, see Input Attributes for more information.