formValidation.js
1.15 KB
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
$(document).ready(function() {
$('#registerFormTag').formValidation({
framework: 'bootstrap',
err: {
container: '#messages'
},
icon: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
vatsimID: {
validators: {
notEmpty: {
message: 'The VATSIM ID is required'
},
stringLength: {
min: 6,
max: 7,
message: 'The VATSIM ID must be more than 6 and less than 7 characters long'
},
regexp: {
regexp: /^[0-9]*$/,
message: 'The VATSIM ID can only consist of numbers'
}
}
},
email: {
validators: {
notEmpty: {
message: 'The password is required'
}
}
}
}
});
});