From 0ca59dc81f61d14046087c002768fd2e98b0092e Mon Sep 17 00:00:00 2001 From: jk Date: Sat, 19 Dec 2015 23:29:22 +0100 Subject: [PATCH] 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... --- js/foundation.abide.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.2