vendor/assets/javascripts/webshims/shims/form-shim-extend.js in webshims-rails-1.14.1 vs vendor/assets/javascripts/webshims/shims/form-shim-extend.js in webshims-rails-1.14.3

- old
+ new

@@ -108,16 +108,17 @@ if(!name){ ret = elem; } else { form = elem.prop('form'); ret = $(document.getElementsByName(name)).filter(function(){ - return this.type == 'radio' && this.name == name && $.prop(this, 'form') == form; + return this.type == 'radio' && $.prop(this, 'form') == form && this.name == name; }); } } return ret; }; + var patternTypes = {url: 1, email: 1, text: 1, search: 1, tel: 1, password: 1}; var lengthTypes = $.extend({textarea: 1}, patternTypes); var validityRules = { valueMissing: function(input, val, cache){ @@ -191,9 +192,11 @@ ret = input[0].validity[name] || false; } return ret; }; }); + +webshims.modules["form-core"].getGroupElements = getGroupElements; webshims.addValidityRule = function(type, fn){ validityRules[type] = fn; };