|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | +<head> |
| 4 | + <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> |
| 5 | + <title>JQuery Validation Engine</title> |
| 6 | + <link rel="stylesheet" href="../css/validationEngine.jquery.css" type="text/css" /> |
| 7 | + <link rel="stylesheet" href="../css/template.css" type="text/css" /> |
| 8 | + <script src="../js/jquery-1.6.min.js" type="text/javascript"></script> |
| 9 | + <script src="../js/jquery-1.8.2.min.js" type="text/javascript"></script> |
| 10 | + <script src="../js/languages/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8"></script> |
| 11 | + <script src="../js/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script> |
| 12 | + <script> |
| 13 | + jQuery(document).ready(function(){ |
| 14 | + // binds form submission and fields to the validation engine |
| 15 | + jQuery("#formID").validationEngine(); |
| 16 | + jQuery('#formID').validationEngine('validate'); |
| 17 | + }); |
| 18 | + </script> |
| 19 | +</head> |
| 20 | +<body> |
| 21 | + <p> |
| 22 | + <a href="#" onclick="alert('is the form valid? '+jQuery('#formID').validationEngine('validate'))">Evaluate form</a> |
| 23 | + | <a href="../index.html" >Back to index</a> |
| 24 | + </p> |
| 25 | + <p> |
| 26 | + file input not included in tests, as it can only be set by the user<br /> |
| 27 | + select does not have a placeholder attribute in html5, however a custom placeholder value can be defined with jquery data attribute<br /> |
| 28 | + <br /> |
| 29 | + ids to check: |
| 30 | + <li>b4b650107d6715de9804f6506f94c98894264230 - <span style="color:red">broken</span> |
| 31 | + <li>30092b1e57e277f22d0ffcb8bd768ffeb9eb02d6 - <span style="color:red">broken</span> |
| 32 | + <li>8c690f39fdc6cde2a30abe4a5098da48c1e2f7fb - <span style="color:red">broken</span> |
| 33 | + <li>70734226e588e662dc83b0e66aa91853a03f0c19 - <span style="color:red">broken</span> |
| 34 | + <li>7f6df30e7cffc680b725eb14f32af4e464cc539e - <span style="color:red">broken</span> |
| 35 | + <li>7c5b05527af47832468b9d6682266d11081fc24f - <span style="color:red">broken</span> |
| 36 | + <li>391b738156e23e05121199d7539746bf8f2c0f68 - <span style="color:red">broken</span> |
| 37 | + <li>a4649825cbfd996e76c37e8a0683de5f5362db0d - <span style="color:green">working</span> |
| 38 | + </p> |
| 39 | + <form id="formID" class="formular" method="post"> |
| 40 | + |
| 41 | + <h1>none of the following should validate</h1> |
| 42 | + |
| 43 | + <fieldset> |
| 44 | + <legend>required + empty</legend> |
| 45 | + |
| 46 | + <legend>text</legend> |
| 47 | + <label> |
| 48 | + <input class="validate[required]" id="ereq1" type="text" /> |
| 49 | + </label> |
| 50 | + |
| 51 | + <legend>password</legend> |
| 52 | + <label> |
| 53 | + <input class="validate[required]" id="ereq2" type="password" /> |
| 54 | + </label> |
| 55 | + |
| 56 | + <legend>textarea</legend> |
| 57 | + <label> |
| 58 | + <input class="validate[required]" id="ereq3" type="textarea" /> |
| 59 | + </label> |
| 60 | + |
| 61 | + <legend>select-one</legend> |
| 62 | + <label> |
| 63 | + <select class="validate[required]" id="ereq4"> |
| 64 | + <option></option> |
| 65 | + <option>a</option> |
| 66 | + </select> |
| 67 | + </label> |
| 68 | + |
| 69 | + <legend>select-multiple</legend> |
| 70 | + <label> |
| 71 | + <select class="validate[required]" id="ereq5" multiple="multiple"> |
| 72 | + <option></option> |
| 73 | + <option>a</option> |
| 74 | + </select> |
| 75 | + </label> |
| 76 | + |
| 77 | + </fieldset> |
| 78 | + |
| 79 | + <fieldset> |
| 80 | + <legend>required + whitespace</legend> |
| 81 | + |
| 82 | + <legend>text</legend> |
| 83 | + <label> |
| 84 | + <input class="validate[required]" id="wreq1" value=" " type="text" /> |
| 85 | + </label> |
| 86 | + |
| 87 | + <legend>password</legend> |
| 88 | + <label> |
| 89 | + <input class="validate[required]" id="wreq2" value=" " type="password" /> |
| 90 | + </label> |
| 91 | + |
| 92 | + <legend>textarea</legend> |
| 93 | + <label> |
| 94 | + <input class="validate[required]" id="wreq3" value=" " type="textarea" /> |
| 95 | + </label> |
| 96 | + |
| 97 | + <legend>select-one</legend> |
| 98 | + <label> |
| 99 | + <select class="validate[required]" id="wreq4"> |
| 100 | + <option> </option> |
| 101 | + <option>a</option> |
| 102 | + </select> |
| 103 | + </label> |
| 104 | + |
| 105 | + <legend>select-multiple</legend> |
| 106 | + <label> |
| 107 | + <select class="validate[required]" id="wreq5" multiple="multiple"> |
| 108 | + <option> </option> |
| 109 | + <option>a</option> |
| 110 | + </select> |
| 111 | + </label> |
| 112 | + |
| 113 | + </fieldset> |
| 114 | + |
| 115 | + <fieldset> |
| 116 | + <legend> |
| 117 | + required + data-validation-placeholder |
| 118 | + </legend> |
| 119 | + |
| 120 | + <legend>text</legend> |
| 121 | + <label> |
| 122 | + <input class="validate[required]" id="dreq1" data-validation-placeholder="placeholder" value="placeholder" type="text" /> |
| 123 | + </label> |
| 124 | + |
| 125 | + <legend>password</legend> |
| 126 | + <label> |
| 127 | + <input class="validate[required]" id="dreq2" data-validation-placeholder="placeholder" value="placeholder" type="password" /> |
| 128 | + </label> |
| 129 | + |
| 130 | + <legend>textarea</legend> |
| 131 | + <label> |
| 132 | + <input class="validate[required]" id="dreq3" data-validation-placeholder="placeholder" value="placeholder" type="textarea" /> |
| 133 | + </label> |
| 134 | + |
| 135 | + <legend>select-one</legend> |
| 136 | + <label> |
| 137 | + <select class="validate[required]" id="dreq4" data-validation-placeholder="placeholder" > |
| 138 | + <option>placeholder</option> |
| 139 | + <option>a</option> |
| 140 | + </select> |
| 141 | + </label> |
| 142 | + |
| 143 | + <legend>select-multiple</legend> |
| 144 | + <label> |
| 145 | + <select class="validate[required]" id="dreq5" data-validation-placeholder="placeholder" multiple="multiple"> |
| 146 | + <option>placeholder</option> |
| 147 | + <option>a</option> |
| 148 | + </select> |
| 149 | + </label> |
| 150 | + |
| 151 | + </fieldset> |
| 152 | + |
| 153 | + <fieldset> |
| 154 | + <legend>required + data-validation-placeholder + partial whitespace</legend> |
| 155 | + |
| 156 | + <legend>text</legend> |
| 157 | + <label> |
| 158 | + <input class="validate[required]" id="dwreq1" data-validation-placeholder="placeholder" value=" placeholder" type="text" /> |
| 159 | + </label> |
| 160 | + |
| 161 | + <legend>password</legend> |
| 162 | + <label> |
| 163 | + <input class="validate[required]" id="dwreq2" data-validation-placeholder="placeholder" value=" placeholder" type="password" /> |
| 164 | + </label> |
| 165 | + |
| 166 | + <legend>textarea</legend> |
| 167 | + <label> |
| 168 | + <input class="validate[required]" id="dwreq3" data-validation-placeholder="placeholder" value=" placeholder" type="textarea" /> |
| 169 | + </label> |
| 170 | + |
| 171 | + <legend>select-one</legend> |
| 172 | + <label> |
| 173 | + <select class="validate[required]" id="dwreq4" data-validation-placeholder="placeholder" > |
| 174 | + <option value=" placeholder"> placeholder</option> |
| 175 | + <option>a</option> |
| 176 | + </select> |
| 177 | + </label> |
| 178 | + |
| 179 | + <legend>select-multiple</legend> |
| 180 | + <label> |
| 181 | + <select class="validate[required]" id="dwreq5" data-validation-placeholder="placeholder" multiple="multiple"> |
| 182 | + <option value=" placeholder"> placeholder</option> |
| 183 | + <option>a</option> |
| 184 | + </select> |
| 185 | + </label> |
| 186 | + |
| 187 | + </fieldset> |
| 188 | + |
| 189 | + <fieldset> |
| 190 | + <legend> |
| 191 | + required + placeholder |
| 192 | + </legend> |
| 193 | + |
| 194 | + <legend>text</legend> |
| 195 | + <label> |
| 196 | + <input class="validate[required]" id="preq1" placeholder="placeholder" type="text" /> |
| 197 | + </label> |
| 198 | + |
| 199 | + <legend>password</legend> |
| 200 | + <label> |
| 201 | + <input class="validate[required]" id="preq2" placeholder="placeholder" type="password" /> |
| 202 | + </label> |
| 203 | + |
| 204 | + <legend>textarea</legend> |
| 205 | + <label> |
| 206 | + <input class="validate[required]" id="preq3" placeholder="placeholder" type="textarea" /> |
| 207 | + </label> |
| 208 | + |
| 209 | + </fieldset> |
| 210 | + |
| 211 | + <fieldset> |
| 212 | + <legend> |
| 213 | + required + placeholder + partial whitespace |
| 214 | + </legend> |
| 215 | + |
| 216 | + <legend>text</legend> |
| 217 | + <label> |
| 218 | + <input class="validate[required]" id="pwreq1" placeholder="placeholder" value=" placeholder" type="text" /> |
| 219 | + </label> |
| 220 | + |
| 221 | + <legend>password</legend> |
| 222 | + <label> |
| 223 | + <input class="validate[required]" id="pwreq2" placeholder="placeholder" value=" placeholder" type="password" /> |
| 224 | + </label> |
| 225 | + |
| 226 | + <legend>textarea</legend> |
| 227 | + <label> |
| 228 | + <input class="validate[required]" id="pwreq3" placeholder="placeholder" value=" placeholder" type="textarea" /> |
| 229 | + </label> |
| 230 | + |
| 231 | + </fieldset> |
| 232 | + |
| 233 | + <h1>the following should all validate</h1> |
| 234 | + |
| 235 | + <fieldset> |
| 236 | + <legend>required + data-validation-placeholder + valid data</legend> |
| 237 | + |
| 238 | + <legend>text</legend> |
| 239 | + <label> |
| 240 | + <input class="validate[required]" id="dvreq1" data-validation-placeholder="placeholder" value="valid data" type="text" /> |
| 241 | + </label> |
| 242 | + |
| 243 | + <legend>password</legend> |
| 244 | + <label> |
| 245 | + <input class="validate[required]" id="dvreq2" data-validation-placeholder="placeholder" value="valid data" type="password" /> |
| 246 | + </label> |
| 247 | + |
| 248 | + <legend>textarea</legend> |
| 249 | + <label> |
| 250 | + <input class="validate[required]" id="dvreq3" data-validation-placeholder="placeholder" value="valid data" type="textarea" /> |
| 251 | + </label> |
| 252 | + |
| 253 | + <legend>select-one</legend> |
| 254 | + <label> |
| 255 | + <select class="validate[required]" id="dvreq4" data-validation-placeholder="placeholder" > |
| 256 | + <option value=" placeholder"> placeholder</option> |
| 257 | + <option selected="selected">a</option> |
| 258 | + </select> |
| 259 | + </label> |
| 260 | + |
| 261 | + <legend>select-multiple</legend> |
| 262 | + <label> |
| 263 | + <select class="validate[required]" id="dvreq5" data-validation-placeholder="placeholder" multiple="multiple"> |
| 264 | + <option value=" placeholder"> placeholder</option> |
| 265 | + <option selected="selected">a</option> |
| 266 | + </select> |
| 267 | + </label> |
| 268 | + |
| 269 | + </fieldset> |
| 270 | + |
| 271 | + <fieldset> |
| 272 | + <legend> |
| 273 | + required + placeholder + valid data |
| 274 | + </legend> |
| 275 | + |
| 276 | + <legend>text</legend> |
| 277 | + <label> |
| 278 | + <input class="validate[required]" id="pvreq1" placeholder="placeholder" value="valid data" type="text" /> |
| 279 | + </label> |
| 280 | + |
| 281 | + <legend>password</legend> |
| 282 | + <label> |
| 283 | + <input class="validate[required]" id="pvreq2" placeholder="placeholder" value="valid data" type="password" /> |
| 284 | + </label> |
| 285 | + |
| 286 | + <legend>textarea</legend> |
| 287 | + <label> |
| 288 | + <input class="validate[required]" id="pvreq3" placeholder="placeholder" value="valid data" type="textarea" /> |
| 289 | + </label> |
| 290 | + |
| 291 | + </fieldset> |
| 292 | + |
| 293 | + <input class="submit" type="submit" value="Validate & Send the form!"/><hr/> |
| 294 | + </form> |
| 295 | +</body> |
| 296 | +</html> |
0 commit comments