From 6529201f6bd722ce7e1265cbc7f041e7f8fcfb7a Mon Sep 17 00:00:00 2001 From: jk Date: Fri, 18 Dec 2015 23:06:13 +0100 Subject: [PATCH] adds support for own RegEx Patterns through pattern attribute to be html5 conform http://www.w3schools.com/tags/att_input_pattern.asp --- 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 1f3f7ac2a..d2802ea28 100644 --- a/js/foundation.abide.js +++ b/js/foundation.abide.js @@ -335,7 +335,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) : - true : true; + pattern ? 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