Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Issue 215: A form with validator can now be be submitted manually wit…

…h $(form).submit()
  • Loading branch information...
commit 9bf5594c559e23343618b49d59ad9c4961c49b7f 1 parent be3082a
@tipiirai tipiirai authored
Showing with 5 additions and 47 deletions.
  1. +3 −45 test/validator/minimal.htm
  2. +2 −2 test/validator/onsubmit.htm
View
48 test/validator/minimal.htm
@@ -1,6 +1,6 @@
+<!DOCTYPE html>
-<!DOCTYPE html>
-<script src="../js/jquery-1.4.2.min.js"></script>
+<script src="../js/jquery-1.5.min.js"></script>
<script src="../../src/validator/validator.js"></script>
<style>
@@ -65,52 +65,10 @@
</select>
</label>
- <button>Submit</button>
+ <!-- <button>Submit</button> -->
</form>
-<form action="#">
- <label>
- requred text
- <input type="text" required="required" />
- </label>
-
- <label>
- pattern
- <input type="text" pattern="\d+" />
- </label>
-
- <label>
- URL
- <input type="url" value="http://www.spa.gov.sa/NewsHeadlines.php?pg=2&joku+paha" />
- </label>
-
- <label>
- date
- <input type="date" title="Use format yyyy-mm-dd" name="day" />
- </label>
-
- <label>
- email
- <input type="email" />
- </label>
-
- <label>
- terms
- <input type="checkbox" required="required" name="terms" data-message="Accept the terms" />
- </label>
-
- <label>
- required
- <select required="required">
- <option value="">-- choose one --</option>
- <option value="8">jotain</option>
- </select>
- </label>
-
- <button>Submit</button>
-
-</form>
<script>
$("form").validator({ position: 'top center'});
View
4 test/validator/onsubmit.htm
@@ -7,7 +7,7 @@
<label>
requred text
- <input type="text" required="required" />
+ <input type="text" name="kama" required="required" />
</label>
<button>Submit</button>
@@ -21,6 +21,6 @@
var failed = $(":input", this).hasClass("invalid");
// do not perform submit
- e.preventDefault();
+ // e.preventDefault();
});
</script>
Please sign in to comment.
Something went wrong with that request. Please try again.