| 1 | <!DOCTYPE html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
| 5 | <title>jQuery validation plug-in - requirejs demo</title> |
| 6 | |
| 7 | <link rel="stylesheet" href="../css/screen.css"> |
| 8 | |
| 9 | <style type="text/css"> |
| 10 | #commentForm { width: 500px; } |
| 11 | #commentForm label { width: 250px; } |
| 12 | #commentForm label.error, #commentForm input.submit { margin-left: 253px; } |
| 13 | </style> |
| 14 | </head> |
| 15 | <body> |
| 16 | |
| 17 | <h1 id="banner"><a href="https://jqueryvalidation.org/">jQuery Validation Plugin</a> Demo</h1> |
| 18 | <div id="main"> |
| 19 | |
| 20 | <p>Default submitHandler is set to display an alert into of submitting the form</p> |
| 21 | <form class="cmxform" id="commentForm" method="get" action=""> |
| 22 | <fieldset> |
| 23 | <legend>Please provide your name, email address (won't be published) and a comment</legend> |
| 24 | <p> |
| 25 | <label for="cname">Name (required, at least 2 characters)</label> |
| 26 | <input id="cname" name="name" minlength="2" type="text" required> |
| 27 | </p> |
| 28 | <p> |
| 29 | <label for="cemail">E-Mail (required)</label> |
| 30 | <input id="cemail" type="email" name="email" required> |
| 31 | </p> |
| 32 | <p> |
| 33 | <label for="curl">URL (optional)</label> |
| 34 | <input id="curl" type="url" name="url"> |
| 35 | </p> |
| 36 | <p> |
| 37 | <label for="ccomment">Your comment (required)</label> |
| 38 | <textarea id="ccomment" name="comment" required></textarea> |
| 39 | </p> |
| 40 | <p> |
| 41 | <input class="submit" type="submit" value="Submit"> |
| 42 | </p> |
| 43 | </fieldset> |
| 44 | </form> |
| 45 | |
| 46 | <script> |
| 47 | var require = { |
| 48 | paths: { |
| 49 | "jquery": "../../lib/jquery-3.1.1" |
| 50 | } |
| 51 | }; |
| 52 | </script> |
| 53 | <script src="../../lib/require.js" data-main="app.js"></script> |
| 54 | </div> |
| 55 | </body> |
| 56 | </html> |