vendor/assets/javascripts/webshims/minified/extras/custom-validity.js in webshims-rails-0.4.3 vs vendor/assets/javascripts/webshims/minified/extras/custom-validity.js in webshims-rails-0.4.4
- old
+ new
@@ -4,7 +4,7 @@
a)})})(jQuery,window,document);
(function(b,f,i){f=b.webshims.addCustomValidityRule;f("partialPattern",function(c,d){if(d&&c.getAttribute("data-partial-pattern")){var a=b(c).data("partial-pattern");return!a?void 0:!RegExp("("+a+")","i").test(d)}},"This format is not allowed here.");f("tooShort",function(c,d){return!d||!c.getAttribute("data-minlength")?void 0:b(c).data("minlength")>d.length},"Entered value is too short.");var k={};f("group-required",function(c){var d=c.name;if(d&&"checkbox"===c.type&&b(c).hasClass("group-required")){var a=
b(c.form&&c.form[d]||i.getElementsByName(d)),c=a.filter(":checked");k[d]&&clearTimeout(k[d]);k[d]=setTimeout(function(){a.unbind("click.groupRequired").bind("click.groupRequired",function(){a.filter(".group-required").each(function(){b.webshims.refreshCustomValidityRules(this)})})},9);return!c[0]}},"Please check one of these checkboxes.");var g=/[^0-9-]+/;f("creditcard",function(c,d){if(d&&b(c).hasClass("creditcard-input")){if(!g.test(d))return!0;var a=0,e=0,f=!1,d=d.replace(/\D/g,"");for(n=d.length-
1;0<=n;n--){e=d.charAt(n);e=parseInt(e,10);if(f&&9<(e*=2))e-=9;a+=e;f=!f}return 0!==a%10}},"Please enter a valid credit card number");var l={prop:"value","from-prop":"value",toggle:!1},j=function(c){return b(c.form[c.name]).filter('[type="radio"]')};b.webshims.ready("form-core",function(){b.webshims.modules&&(j=b.webshims.modules["form-core"].getGroupElements||j)});f("dependent",function(c,d){if(c.getAttribute("data-dependent-validation")){var a=b(c).data("dependentValidation"),e;if(a){var f=function(){var d=
b.prop(a.masterElement,a["from-prop"]);e&&(d=-1!==b.inArray(d,e));a.toggle&&(d=!d);b.prop(c,a.prop,d)};if(!a._init||!a.masterElement){"string"==typeof a&&(a={from:a});a.masterElement=i.getElementById(a.from)||i.getElementsByName(a.from||[])[0];if(!a.masterElement||!a.masterElement.form)return;if(/radio|checkbox/i.test(a.masterElement.type)){if(a["from-prop"]||(a["from-prop"]="checked"),!a.prop&&"checked"==a["from-prop"])a.prop="disabled"}else a["from-prop"]||(a["from-prop"]="value");0===a["from-prop"].indexOf("value:")&&
-(e=a["from-prop"].replace("value:","").split("||"),a["from-prop"]="value");a=b.data(c,"dependentValidation",b.extend({_init:!0},l,a));"value"!==a.prop||e?b("radio"===a.masterElement.type&&j(a.masterElement)||a.masterElement).bind("change",f):b(a.masterElement).bind("change",function(){b.webshims.refreshCustomValidityRules(c);b(c).is(".form-ui-invalid, .form-ui-valid")&&b(c).trigger("refreshvalidityui")})}if("value"==a.prop&&!e)return b.prop(a.masterElement,"value")!=d;f();return""}}},"The value of this field does not repeat the value of the other field")})(jQuery,
+(e=a["from-prop"].replace("value:","").split("||"),a["from-prop"]="value");a=b.data(c,"dependentValidation",b.extend({_init:!0},l,a));"value"!==a.prop||e?b("radio"===a.masterElement.type&&j(a.masterElement)||a.masterElement).bind("change",f):b(a.masterElement).bind("change",function(){b.webshims.refreshCustomValidityRules(c);b(c).is(".user-error, .user-success")&&b(c).trigger("refreshvalidityui")})}if("value"==a.prop&&!e)return b.prop(a.masterElement,"value")!=d;f();return""}}},"The value of this field does not repeat the value of the other field")})(jQuery,
window,document);