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.
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <title>Form</title>
- <script src="lib/jquery.js" type="text/javascript"></script>
- <script src="lib/jquery.metadata.js" type="text/javascript"></script>
- <script src="jquery.validate.js" type="text/javascript"></script>
- <script type="text/javascript">
- $.metadata.setType("attr", "validate");
- $(document).ready(function() {
- $("#form1").validate({
- messages: {
- checkbox1: {required: 'you must agree'}
- }
- }
- );
- });
- </script>
- </head>
- <body>
- <div id="apDiv1">
- <h1 style="text-align:center">STEP ONE</h1>
- </div>
-
- <form id="form1" action="action.php" method="post">
- Enter Your Number
- <label>
- <input name="textfield1" type="text" id="textfield1" />
- </label>
-
- <p/>
- I agree
- <input type="checkbox" name="checkbox1" id="checkbox1" validate="required:true"/>
- <p/>
- <input type="submit" name="submit" value="Next" />
-
- </form>
- </body>
- </html>
Thank you in advance.