Skip to content

Commit b009f41

Browse files
committed
Cleanup whitespace
1 parent 6b8f2c2 commit b009f41

File tree

2 files changed

+65
-65
lines changed

2 files changed

+65
-65
lines changed

additional-methods.js

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,42 @@
1212
*/
1313

1414
(function() {
15-
15+
1616
function stripHtml(value) {
1717
// remove html tags and space chars
1818
return value.replace(/<.[^<>]*?>/g, ' ').replace(/&nbsp;|&#160;/gi, ' ')
1919
// remove numbers and punctuation
2020
.replace(/[0-9.(),;:!?%#$'"_+=\/-]*/g,'');
2121
}
22-
jQuery.validator.addMethod("maxWords", function(value, element, params) {
23-
return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length < params;
24-
}, jQuery.validator.format("Please enter {0} words or less."));
25-
26-
jQuery.validator.addMethod("minWords", function(value, element, params) {
27-
return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
28-
}, jQuery.validator.format("Please enter at least {0} words."));
29-
30-
jQuery.validator.addMethod("rangeWords", function(value, element, params) {
31-
return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params[0] && value.match(/bw+b/g).length < params[1];
22+
jQuery.validator.addMethod("maxWords", function(value, element, params) {
23+
return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length < params;
24+
}, jQuery.validator.format("Please enter {0} words or less."));
25+
26+
jQuery.validator.addMethod("minWords", function(value, element, params) {
27+
return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
28+
}, jQuery.validator.format("Please enter at least {0} words."));
29+
30+
jQuery.validator.addMethod("rangeWords", function(value, element, params) {
31+
return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params[0] && value.match(/bw+b/g).length < params[1];
3232
}, jQuery.validator.format("Please enter between {0} and {1} words."));
3333

3434
})();
3535

3636
jQuery.validator.addMethod("letterswithbasicpunc", function(value, element) {
3737
return this.optional(element) || /^[a-z-.,()'\"\s]+$/i.test(value);
38-
}, "Letters or punctuation only please");
38+
}, "Letters or punctuation only please");
3939

4040
jQuery.validator.addMethod("alphanumeric", function(value, element) {
4141
return this.optional(element) || /^\w+$/i.test(value);
42-
}, "Letters, numbers, spaces or underscores only please");
42+
}, "Letters, numbers, spaces or underscores only please");
4343

4444
jQuery.validator.addMethod("lettersonly", function(value, element) {
4545
return this.optional(element) || /^[a-z]+$/i.test(value);
46-
}, "Letters only please");
46+
}, "Letters only please");
4747

4848
jQuery.validator.addMethod("nowhitespace", function(value, element) {
4949
return this.optional(element) || /^\S+$/i.test(value);
50-
}, "No white space please");
50+
}, "No white space please");
5151

5252
jQuery.validator.addMethod("ziprange", function(value, element) {
5353
return this.optional(element) || /^90[2-5]\d\{2}-\d{4}$/.test(value);
@@ -68,7 +68,7 @@ jQuery.validator.addMethod("integer", function(value, element) {
6868
* @name jQuery.validator.methods.vinUS
6969
* @type Boolean
7070
* @cat Plugins/Validate/Methods
71-
*/
71+
*/
7272
jQuery.validator.addMethod(
7373
"vinUS",
7474
function(v){
@@ -105,7 +105,7 @@ jQuery.validator.addMethod(
105105
cd = rs % 11;
106106
if(cd == 10){cd = "X";}
107107
if(cd == cdv){return true;}
108-
return false;
108+
return false;
109109
},
110110
"The specified vehicle identification number (VIN) is invalid."
111111
);
@@ -147,7 +147,7 @@ jQuery.validator.addMethod(
147147
} else
148148
check = false;
149149
return this.optional(element) || check;
150-
},
150+
},
151151
"Please enter a correct date"
152152
);
153153

@@ -162,25 +162,25 @@ jQuery.validator.addMethod("time", function(value, element) {
162162
);
163163

164164
/**
165-
* matches US phone number format
166-
*
167-
* where the area code may not start with 1 and the prefix may not start with 1
168-
* allows '-' or ' ' as a separator and allows parens around area code
169-
* some people may want to put a '1' in front of their number
170-
*
165+
* matches US phone number format
166+
*
167+
* where the area code may not start with 1 and the prefix may not start with 1
168+
* allows '-' or ' ' as a separator and allows parens around area code
169+
* some people may want to put a '1' in front of their number
170+
*
171171
* 1(212)-999-2345
172172
* or
173173
* 212 999 2344
174174
* or
175175
* 212-999-0983
176-
*
176+
*
177177
* but not
178178
* 111-123-5434
179179
* and not
180180
* 212 123 4567
181181
*/
182182
jQuery.validator.addMethod("phoneUS", function(phone_number, element) {
183-
phone_number = phone_number.replace(/\s+/g, "");
183+
phone_number = phone_number.replace(/\s+/g, "");
184184
return this.optional(element) || phone_number.length > 9 &&
185185
phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
186186
}, "Please specify a valid phone number");
@@ -202,45 +202,45 @@ jQuery.validator.addMethod("strippedminlength", function(value, element, param)
202202

203203
// same as email, but TLD is optional
204204
jQuery.validator.addMethod("email2", function(value, element, param) {
205-
return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);
205+
return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);
206206
}, jQuery.validator.messages.email);
207207

208208
// same as url, but TLD is optional
209209
jQuery.validator.addMethod("url2", function(value, element, param) {
210-
return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
210+
return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
211211
}, jQuery.validator.messages.url);
212212

213213
// NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
214214
// Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
215215
// Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
216216
jQuery.validator.addMethod("creditcardtypes", function(value, element, param) {
217217

218-
if (/[^0-9-]+/.test(value))
218+
if (/[^0-9-]+/.test(value))
219219
return false;
220-
220+
221221
value = value.replace(/\D/g, "");
222-
222+
223223
var validTypes = 0x0000;
224-
225-
if (param.mastercard)
224+
225+
if (param.mastercard)
226226
validTypes |= 0x0001;
227-
if (param.visa)
227+
if (param.visa)
228228
validTypes |= 0x0002;
229-
if (param.amex)
229+
if (param.amex)
230230
validTypes |= 0x0004;
231-
if (param.dinersclub)
231+
if (param.dinersclub)
232232
validTypes |= 0x0008;
233-
if (param.enroute)
233+
if (param.enroute)
234234
validTypes |= 0x0010;
235-
if (param.discover)
235+
if (param.discover)
236236
validTypes |= 0x0020;
237-
if (param.jcb)
237+
if (param.jcb)
238238
validTypes |= 0x0040;
239-
if (param.unknown)
239+
if (param.unknown)
240240
validTypes |= 0x0080;
241-
if (param.all)
241+
if (param.all)
242242
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
243-
243+
244244
if (validTypes & 0x0001 && /^(51|52|53|54|55)/.test(value)) { //mastercard
245245
return value.length == 16;
246246
}
@@ -271,21 +271,21 @@ jQuery.validator.addMethod("creditcardtypes", function(value, element, param) {
271271
return false;
272272
}, "Please enter a valid credit card number.");
273273

274-
jQuery.validator.addMethod("ipv4", function(value, element, param) {
274+
jQuery.validator.addMethod("ipv4", function(value, element, param) {
275275
return this.optional(element) || /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i.test(value);
276276
}, "Please enter a valid IP v4 address.");
277277

278-
jQuery.validator.addMethod("ipv6", function(value, element, param) {
278+
jQuery.validator.addMethod("ipv6", function(value, element, param) {
279279
return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
280280
}, "Please enter a valid IP v6 address.");
281281

282282
/**
283283
* Return true if the field value matches the given format RegExp
284284
*
285-
* @example jQuery.validator.methods.pattern("AR1004",element,/^AR\d{4}$/)
285+
* @example jQuery.validator.methods.pattern("AR1004",element,/^AR\d{4}$/)
286286
* @result true
287287
*
288-
* @example jQuery.validator.methods.pattern("BR1004",element,/^AR\d{4}$/)
288+
* @example jQuery.validator.methods.pattern("BR1004",element,/^AR\d{4}$/)
289289
* @result false
290290
*
291291
* @name jQuery.validator.methods.pattern

test/methods.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(function($) {
2-
2+
33
function methodTest( methodName ) {
44
var v = jQuery("#form").validate();
55
var method = $.validator.methods[methodName];
@@ -121,7 +121,7 @@ test("number", function() {
121121
ok(!method( "123.0.0,0" ), "Invalid number" );
122122
ok(!method( "x123" ), "Invalid number" );
123123
ok(!method( "100.100,0,0" ), "Invalid number" );
124-
124+
125125
ok( method( "" ), "Blank is valid" );
126126
ok( method( "123" ), "Valid decimal" );
127127
ok( method( "123000" ), "Valid decimal" );
@@ -149,7 +149,7 @@ test("numberDE", function() {
149149
ok(!method( "123,0,0.0" ), "Invalid numberDE" );
150150
ok(!method( "x123" ), "Invalid numberDE" );
151151
ok(!method( "100,100.0.0" ), "Invalid numberDE" );
152-
152+
153153
ok( method( "" ), "Blank is valid" );
154154
ok( method( "123" ), "Valid decimalDE" );
155155
ok( method( "123000" ), "Valid decimalDE" );
@@ -200,25 +200,25 @@ test("required", function() {
200200
ok( method.call( v, e[0].value, e[0]), "Valid text input" );
201201
ok(!method.call( v, e[1].value, e[1]), "Invalid text input" );
202202
ok(!method.call( v, e[1].value, e[2]), "Invalid text input" );
203-
203+
204204
ok(!method.call( v, e[2].value, e[3]), "Invalid select" );
205205
ok( method.call( v, e[3].value, e[4]), "Valid select" );
206-
206+
207207
e = $('#area1, #area2, #pw1, #pw2');
208208
ok( method.call( v, e[0].value, e[0]), "Valid textarea" );
209209
ok(!method.call( v, e[1].value, e[1]), "Invalid textarea" );
210210
ok( method.call( v, e[2].value, e[2]), "Valid password input" );
211211
ok(!method.call( v, e[3].value, e[3]), "Invalid password input" );
212-
212+
213213
e = $('#radio1, #radio2, #radio3');
214214
ok(!method.call( v, e[0].value, e[0]), "Invalid radio" );
215215
ok( method.call( v, e[1].value, e[1]), "Valid radio" );
216216
ok( method.call( v, e[2].value, e[2]), "Valid radio" );
217-
217+
218218
e = $('#check1, #check2');
219219
ok( method.call( v, e[0].value, e[0]), "Valid checkbox" );
220220
ok(!method.call( v, e[1].value, e[1]), "Invalid checkbox" );
221-
221+
222222
e = $('#select1, #select2, #select3, #select4');
223223
ok(!method.call( v, e[0].value, e[0]), "Invalid select" );
224224
ok( method.call( v, e[1].value, e[1]), "Valid select" );
@@ -253,12 +253,12 @@ test("minlength", function() {
253253
ok(!method.call( v, e[1].value, e[1], param), "Invalid text input" );
254254
ok(!method.call( v, e[2].value, e[2], param), "Invalid text input" );
255255
ok( method.call( v, e[3].value, e[3], param), "Valid text input" );
256-
256+
257257
e = $('#check1, #check2, #check3');
258258
ok(!method.call( v, e[0].value, e[0], param), "Valid checkbox" );
259259
ok( method.call( v, e[1].value, e[1], param), "Valid checkbox" );
260260
ok( method.call( v, e[2].value, e[2], param), "Invalid checkbox" );
261-
261+
262262
e = $('#select1, #select2, #select3, #select4, #select5');
263263
ok(method.call( v, e[0].value, e[0], param), "Valid select " + e[0].id );
264264
ok(!method.call( v, e[1].value, e[1], param), "Invalid select " + e[1].id );
@@ -275,12 +275,12 @@ test("maxlength", function() {
275275
ok( method.call( v, e[0].value, e[0], param), "Valid text input" );
276276
ok( method.call( v, e[1].value, e[1], param), "Valid text input" );
277277
ok(!method.call( v, e[2].value, e[2], param), "Invalid text input" );
278-
278+
279279
e = $('#check1, #check2, #check3');
280280
ok( method.call( v, e[0].value, e[0], param), "Valid checkbox" );
281281
ok( method.call( v, e[1].value, e[1], param), "Invalid checkbox" );
282282
ok(!method.call( v, e[2].value, e[2], param), "Invalid checkbox" );
283-
283+
284284
e = $('#select1, #select2, #select3, #select4');
285285
ok( method.call( v, e[0].value, e[0], param), "Valid select" );
286286
ok( method.call( v, e[1].value, e[1], param), "Valid select" );
@@ -349,7 +349,7 @@ test("accept", function() {
349349
ok( method( "picture.jpeg" ), "Valid default accept type" );
350350
ok( method( "picture.png" ), "Valid default accept type" );
351351
ok( !method( "picture.pgn" ), "Invalid default accept type" );
352-
352+
353353
var v = jQuery("#form").validate(),
354354
method = function(value, param) {
355355
return $.validator.methods.accept.call(v, value, $('#text1')[0], param)
@@ -359,7 +359,7 @@ test("accept", function() {
359359
ok( method( "picture.pdf", "pdf|doc"), "Valid custom accept type" );
360360
ok( !method( "picture.pdf", "doc"), "Invalid custom accept type" );
361361
ok( !method( "picture.doc", "pdf"), "Invalid custom accept type" );
362-
362+
363363
ok( method( "picture.pdf", "doc,pdf"), "Valid custom accept type, comma seperated" );
364364
ok( method( "picture.pdf", "pdf,doc"), "Valid custom accept type, comma seperated" );
365365
ok( !method( "picture.pdf", "gop,top"), "Invalid custom accept type, comma seperated" );
@@ -390,7 +390,7 @@ test("remote", function() {
390390
$(document).unbind("ajaxStop");
391391
equals( 1, v.size(), "There must be one error" );
392392
equals( "Peter in use", v.errorList[0].message );
393-
393+
394394
$(document).ajaxStop(function() {
395395
$(document).unbind("ajaxStop");
396396
equals( 1, v.size(), "There must be one error" );
@@ -538,12 +538,12 @@ test('creditcardtypes, all', function() {
538538
}
539539
}
540540
});
541-
541+
542542
testCardTypeByNumber("4111-1111-1111-1111", "VISA", true)
543543
testCardTypeByNumber("5111-1111-1111-1118", "MasterCard", true)
544544
testCardTypeByNumber("6111-1111-1111-1116", "Discover", true)
545545
testCardTypeByNumber("3400-0000-0000-009", "AMEX", true);
546-
546+
547547
testCardTypeByNumber("4111-1111-1111-1110", "VISA", false)
548548
testCardTypeByNumber("5432-1111-1111-1111", "MasterCard", false)
549549
testCardTypeByNumber("6611-6611-6611-6611", "Discover", false)
@@ -562,7 +562,7 @@ test('creditcardtypes, visa', function() {
562562
}
563563
}
564564
});
565-
565+
566566
testCardTypeByNumber("4111-1111-1111-1111", "VISA", true)
567567
testCardTypeByNumber("5111-1111-1111-1118", "MasterCard", false)
568568
testCardTypeByNumber("6111-1111-1111-1116", "Discover", false)
@@ -580,7 +580,7 @@ test('creditcardtypes, mastercard', function() {
580580
}
581581
}
582582
});
583-
583+
584584
testCardTypeByNumber("5111-1111-1111-1118", "MasterCard", true)
585585
testCardTypeByNumber("6111-1111-1111-1116", "Discover", false)
586586
testCardTypeByNumber("3400-0000-0000-009", "AMEX", false);

0 commit comments

Comments
 (0)