To setup form validation and extra form input descriptions, you first need to attach the required scripts and stylesheets in the head of your html document.
<head> ... <script src="../eui/js/jquery/jquery-1.4.min.js" type="text/javascript" charset="utf-8"></script> <script src="../eui/js/form/validation.js" type="text/javascript" charset="utf-8"></script> <script src="../eui/js/form/descriptions.js" type="text/javascript" charset="utf-8"></script> ... </head>
Next you need to initiate and configure the validation and description scripts.
<script type="text/javascript" charset="utf-8"> $(function() { $('#demo-form').validation({ fields: [ { id: "name", test: "is_empty" }, { id: "email", test: "is_email" }, { id: "comment", test: "is_empty" } ] }); $('input[type=text]').descriptions() $('textarea').descriptions(); }); </script>