Changeset 4547
- Timestamp:
- 01/28/08 18:49:04 (7 months ago)
- Location:
- trunk/plugins/validate
- Files:
-
- 2 modified
-
jquery.validate.js (modified) (1 diff)
-
test/test.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/validate/jquery.validate.js
r4535 r4547 17 17 // http://docs.jquery.com/Plugins/Validation/validate 18 18 validate: function( options ) { 19 20 // if nothing is selected, return nothing; can't chain anyway 21 if (!this.length) { 22 options && options.debug && window.console && console.warn( "nothing selected, can't validate, returning nothing" ); 23 return; 24 } 19 25 20 26 // check if a validator for this form was already created -
trunk/plugins/validate/test/test.js
r4540 r4547 8 8 equals( v1, v2, "Calling validate() multiple times must return the same validator instance" ); 9 9 equals( 2, v1.elements().length, "validator must have two elements" ); 10 }); 11 12 test("validate() without elements, with non-form elements", function() { 13 $("#doesn'texist").validate(); 10 14 }); 11 15