html5.html 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>BootstrapValidator demo</title>
  5. <link rel="stylesheet" href="../vendor/bootstrap/css/bootstrap.css"/>
  6. <link rel="stylesheet" href="../dist/css/bootstrapValidator.css"/>
  7. <script type="text/javascript" src="../vendor/jquery/jquery-1.10.2.min.js"></script>
  8. <script type="text/javascript" src="../vendor/bootstrap/js/bootstrap.min.js"></script>
  9. <script type="text/javascript" src="../dist/js/bootstrapValidator.js"></script>
  10. </head>
  11. <body>
  12. <div class="container">
  13. <div class="row">
  14. <!-- form: -->
  15. <section>
  16. <div class="col-lg-8 col-lg-offset-2">
  17. <div class="page-header">
  18. <h2>Sign up</h2>
  19. </div>
  20. <form id="defaultForm" method="post" class="form-horizontal" action="target.php"
  21. data-bv-message="This value is not valid"
  22. data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
  23. data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
  24. data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">
  25. <div class="form-group">
  26. <label class="col-lg-3 control-label">Full name</label>
  27. <div class="col-lg-4">
  28. <input type="text" class="form-control" name="firstName" placeholder="First name" required data-bv-notempty-message="The first name is required and cannot be empty" />
  29. </div>
  30. <div class="col-lg-4">
  31. <input type="text" class="form-control" name="lastName" placeholder="Last name" required data-bv-notempty-message="The last name is required and cannot be empty" />
  32. </div>
  33. </div>
  34. <div class="form-group">
  35. <label class="col-lg-3 control-label">Username</label>
  36. <div class="col-lg-5">
  37. <input type="text" class="form-control" name="username"
  38. data-bv-message="The username is not valid"
  39. required data-bv-notempty-message="The username is required and cannot be empty"
  40. pattern="[a-zA-Z0-9_\.]+" data-bv-regexp-message="The username can only consist of alphabetical, number, dot and underscore"
  41. />
  42. </div>
  43. </div>
  44. <div class="form-group">
  45. <label class="col-lg-3 control-label">Email address</label>
  46. <div class="col-lg-5">
  47. <input class="form-control" name="email" type="email" required data-bv-emailaddress-message="The input is not a valid email address" />
  48. </div>
  49. </div>
  50. <div class="form-group">
  51. <div class="col-lg-9 col-lg-offset-3">
  52. <button type="submit" class="btn btn-primary">Sign up</button>
  53. </div>
  54. </div>
  55. </form>
  56. </div>
  57. </section>
  58. <!-- :form -->
  59. </div>
  60. </div>
  61. <script type="text/javascript">
  62. $(document).ready(function() {
  63. $('#defaultForm').bootstrapValidator();
  64. });
  65. </script>
  66. </body>
  67. </html>