From: jk Date: Sat, 19 Dec 2015 22:29:22 +0000 (+0100) Subject: fixes little bug #7624 X-Git-Tag: v6.1.0~4^2^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7634%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fixes little bug #7624 because type patterns are validated through options.patterns we can check pattern!=type to not check patterns like reset,submit,text... --- diff --git a/js/foundation.abide.js b/js/foundation.abide.js index 527291da7..846636ca4 100644 --- a/js/foundation.abide.js +++ b/js/foundation.abide.js @@ -337,7 +337,7 @@ return inputText.length ?//if text, check if the pattern exists, if so, test it, if no text or no pattern, return true. this.options.patterns.hasOwnProperty(pattern) ? this.options.patterns[pattern].test(inputText) : - pattern ? new RegExp(pattern).test(inputText) : true : true; + pattern && pattern!=$el.attr('type') ? new RegExp(pattern).test(inputText) : true : true; }; /** * Determines whether or a not a radio input is valid based on whether or not it is required and selected