[Validation] Don't get any error when needed
Hello All,
I just found the plugin named "Validation". After some lookups in the source of a form of the maker as example I thought that it would be easy to implement it. Unfortunately it doesn't, also I can't find any good docs about how I need to make a form with that validation.
This is for so far I have my HTML and such
- ${}.ready(function() {
- $("#registerForm").validate({
- rules: {
- gebruikersnaam: {
- required: true,
- minlength: 3,
- maxlength: 25
- },
- voornaam: {
- required: true,
- minlength: 3,
- maxlength: 25
- },
- },
- messages: {
- gebruikersnaam: {
- required: "Je gebruikersnaam is niet ingevuld",
- minlength: "Je gebruikersnaam is te kort (minimaal 3)"
- },
- voornaam: "Je voornaam is niet ingevuld"
- }
- });
- });
- </script>
-
- <form id="registerForm" method="POST" action="bla.html">
- <table cellpadding=0 cellspacing=0 border=0 style="table-layout:fixed" width="341">
- <tr>
- <td width="150">Gebruikersnaam:</td>
- <td width="300" align="center"><input type="text" name="gebruikersnaam" size="25" maxlength="12"></td>
- </tr>
- <tr>
- <td width="150">Voornaam:</td>
- <td width="300" align="center"><input type="text" name="voornaam" size="25" maxlength="12"></td>
- </tr>
Mind the form close (that is good and such), but what am I doing wrong...? Because I somewhat just match the example of the author (for so far it is explained (which isn't imo))!?!?