| 2 |
lars |
1 |
<!DOCTYPE html>
|
|
|
2 |
<html lang="en">
|
|
|
3 |
<head>
|
|
|
4 |
<meta charset="utf-8">
|
|
|
5 |
<title>jQuery validation plug-in - comment form example</title>
|
|
|
6 |
<link rel="stylesheet" href="css/screen.css">
|
|
|
7 |
<link rel="stylesheet" href="css/cmxform.css">
|
|
|
8 |
<script src="../lib/jquery.js"></script>
|
|
|
9 |
<script src="../dist/jquery.validate.js"></script>
|
|
|
10 |
<script src="../dist/additional-methods.js"></script>
|
|
|
11 |
<script>
|
|
|
12 |
$(document).ready(function() {
|
|
|
13 |
$("#fileForm").validate();
|
|
|
14 |
});
|
|
|
15 |
</script>
|
|
|
16 |
</head>
|
|
|
17 |
<body>
|
|
|
18 |
<form class="cmxform" id="fileForm" method="post" action="">
|
|
|
19 |
<fieldset>
|
|
|
20 |
<legend>Select the indicated type of files?</legend>
|
|
|
21 |
<p>
|
|
|
22 |
<label for="file1">Select a plain text file (e.g. *.txt)</label>
|
|
|
23 |
<input type="file" id="file1" name="file1" class="required" accept="text/plain">
|
|
|
24 |
</p>
|
|
|
25 |
<p>
|
|
|
26 |
<label for="file2">Select any image file</label>
|
|
|
27 |
<input type="file" id="file2" name="file2" class="required" accept="image/*">
|
|
|
28 |
</p>
|
|
|
29 |
<p>
|
|
|
30 |
<label for="file3">Select either a PDF or a EPS file</label>
|
|
|
31 |
<input type="file" id="file3" name="file3" class="required" accept="image/x-eps,application/pdf">
|
|
|
32 |
</p>
|
|
|
33 |
<p>
|
|
|
34 |
<label for="file4">Select any audio or image file</label>
|
|
|
35 |
<input type="file" id="file4" name="file4" class="required" accept="image/*,audio/*">
|
|
|
36 |
</p>
|
|
|
37 |
<p>
|
|
|
38 |
<label for="file5">Select one or more plain text files (e.g. *.txt)</label>
|
|
|
39 |
<input type="file" id="file5" name="file5" class="required" multiple accept="text/plain">
|
|
|
40 |
</p>
|
|
|
41 |
<p>
|
|
|
42 |
<input class="submit" type="submit" value="Submit">
|
|
|
43 |
</p>
|
|
|
44 |
</fieldset>
|
|
|
45 |
</form>
|
|
|
46 |
</body>
|
|
|
47 |
</html>
|