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 91-100
$(document).ready(function() {
Link Here
|
91 |
}, |
93 |
}, |
92 |
messages: { |
94 |
messages: { |
93 |
enrolmentperiod: { |
95 |
enrolmentperiod: { |
94 |
required: MSG_ONE_ENROLLMENTPERIOD |
96 |
required: __("Please choose an enrollment period in months OR by date.") |
95 |
}, |
97 |
}, |
96 |
enrolmentperioddate: { |
98 |
enrolmentperioddate: { |
97 |
required: MSG_ONE_ENROLLMENTPERIOD |
99 |
required: __("Please choose an enrollment period in months OR by date.") |
98 |
} |
100 |
} |
99 |
} |
101 |
} |
100 |
|
102 |
|
101 |
- |
|
|