validation doesn't seem to be working properly

validation doesn't seem to be working properly

Hello, I have a problem with validation plugin. It was working but now it doesn't. I don't know why this has been happened. the question is on stack-overflow.


and here is the code that I have written.
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

  3. <head>
  4.  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  5.   <title>Form</title>
  6.   <script src="lib/jquery.js" type="text/javascript"></script>
  7. <script src="lib/jquery.metadata.js" type="text/javascript"></script>
  8. <script src="jquery.validate.js" type="text/javascript"></script>

  9. <script type="text/javascript">

  10. $.metadata.setType("attr", "validate");

  11. $(document).ready(function() {
  12. $("#form1").validate({
  13. messages: {
  14. checkbox1: {required: 'you must agree'}
  15. }
  16. }
  17. );
  18. });
  19. </script>

  20. </head>

  21. <body>
  22. <div id="apDiv1">
  23. <h1 style="text-align:center">STEP ONE</h1>
  24. </div>
  25.   
  26.   <form  id="form1" action="action.php"  method="post">

  27.      Enter Your Number
  28.         <label>
  29.           <input name="textfield1" type="text" id="textfield1" />
  30.         </label>
  31.  
  32.   <p/>
  33.  I agree
  34.  <input type="checkbox" name="checkbox1" id="checkbox1" validate="required:true"/>

  35.      <p/>   
  36.     <input type="submit" name="submit" value="Next"  />
  37.   

  38.   </form>

  39. </body>

  40. </html>




Thank you in  advance.