Lines 1-3
Link Here
|
|
|
1 |
/* global __ */ |
2 |
|
1 |
jQuery.validator.addMethod( "letters_numbers", function(value,element){ |
3 |
jQuery.validator.addMethod( "letters_numbers", function(value,element){ |
2 |
var patt = /^[a-zA-Z0-9\-_]+$/g; |
4 |
var patt = /^[a-zA-Z0-9\-_]+$/g; |
3 |
if (patt.test(element.value)) { |
5 |
if (patt.test(element.value)) { |
Lines 5-11
jQuery.validator.addMethod( "letters_numbers", function(value,element){
Link Here
|
5 |
} else { |
7 |
} else { |
6 |
return false; |
8 |
return false; |
7 |
} |
9 |
} |
8 |
}, MSG_CATEGORYCODE_CHARS |
10 |
}, __("Category code can only contain the following characters: letters, numbers, - and _.") |
9 |
); |
11 |
); |
10 |
|
12 |
|
11 |
jQuery.validator.addMethod( "enrollment_period", function(){ |
13 |
jQuery.validator.addMethod( "enrollment_period", function(){ |
Lines 16-22
jQuery.validator.addMethod( "enrollment_period", function(){
Link Here
|
16 |
} else { |
18 |
} else { |
17 |
return true; |
19 |
return true; |
18 |
} |
20 |
} |
19 |
}, MSG_ONE_ENROLLMENTPERIOD |
21 |
}, __("Please choose an enrollment period in months OR by date.") |
20 |
); |
22 |
); |
21 |
|
23 |
|
22 |
|
24 |
|
Lines 88-97
$(document).ready(function() {
Link Here
|
88 |
}, |
90 |
}, |
89 |
messages: { |
91 |
messages: { |
90 |
enrolmentperiod: { |
92 |
enrolmentperiod: { |
91 |
required: MSG_ONE_ENROLLMENTPERIOD |
93 |
required: __("Please choose an enrollment period in months OR by date.") |
92 |
}, |
94 |
}, |
93 |
enrolmentperioddate: { |
95 |
enrolmentperioddate: { |
94 |
required: MSG_ONE_ENROLLMENTPERIOD |
96 |
required: __("Please choose an enrollment period in months OR by date.") |
95 |
} |
97 |
} |
96 |
} |
98 |
} |
97 |
|
99 |
|
98 |
- |
|
|