vendor/assets/javascripts/webshims/shims/form-shim-extend.js in webshims-rails-1.14.6 vs vendor/assets/javascripts/webshims/shims/form-shim-extend.js in webshims-rails-1.15.2

- old
+ new

@@ -95,11 +95,10 @@ } return false; }; var emptyJ = $([]); -//TODO: cache + perftest var getGroupElements = function(elem){ elem = $(elem); var name, form; var ret = emptyJ; if(elem[0].type == 'radio'){ @@ -165,10 +164,10 @@ ; $.each({tooShort: ['minLength', -1], tooLong: ['maxLength', 1]}, function(name, props){ validityRules[name] = function(input, val, cache){ //defaultValue is not the same as dirty flag, but very similiar - if(cache.nodeName == 'select' || input.prop('defaultValue') == val){return false;} + if(!val || cache.nodeName == 'select' || input.prop('defaultValue') == val){return false;} cacheType(cache, input[0]); if(!lengthTypes[cache.type]){return false;} var prop = input.prop(props[0]);