2
2
function validate (form) {
6
7
// ticket: standard text, hidden, password, or textarea box
7
8
var ticket = form.elements['ticket'].value;
8
9
if (ticket == null || ! ticket.match(/^\d+$/)) {
9
10
alertstr += '- Invalid entry for the "Ticket" field\n';
12
14
if (invalid > 0 || alertstr != '') {
13
15
if (! invalid) invalid = 'The following'; // catch for programmer error
14
16
alert(''+invalid+' error(s) were encountered with your submission:'+'\n\n'
15
17
+alertstr+'\n'+'Please correct these fields and try again.');
21
20
return true; // all checked ok