-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.txt
57 lines (52 loc) · 1.68 KB
/
test.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<section id="val">
<script type="text/javascript">
// Wait for the DOM to be ready
$(function() {
// Initialize form validation on the registration form.
// It has the name attribute "registration"
$("form[name='add_staff']").validate({
// Specify validation rules
rules: {
// The key name on the left side is the name attribute
// of an input field. Validation rules are defined
// on the right side
username: " required",
email: {
required: true,
// Specify that email should be validated
// by the built-in "email" rule
email: true
},
password: {
required: true,
minlength: 5
}
},
// Specify validation error messages
messages: {
firstname: " Please enter a valid username",
password: {
required: " Please provide a password",
minlength: " Your password must be at least 5 characters long"
},
email: " Please enter a valid email address"
},
// Make sure the form is submitted to the destination defined
// in the "action" attribute of the form when valid
submitHandler: function(form) {
form.submit();
}
});
});
</script>
<style type="text/css">
form .error {
color: #ff0000;
}
</style>
</section>
<script src="../assets/js/jquery.min.js" type="text/javascript"></script>
<script src="../assets/js/jquery.validate.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="../assets/css/bootstrap-5.1.3-dist/css/bootstrap.css">
<link rel="stylesheet" href="../assets/css/style.css" type="text/css" media="all" />
<link rel="stylesheet" href="../assets/css/mystyle.css">