Commit 144371aa authored by jelles's avatar jelles
Browse files

Issue #2266333 by ardeso, fastangel: Fixed Problem with regex expression and commerce.

parent a4494db7
......@@ -984,7 +984,12 @@
return this.optional(element);
}
else {
var regexp = new RegExp(param.regex[0], param.regex[1]);
var modifier = param.regex[1];
var valid_modifiers = ['i', 'g', 'm'];
if (jQuery.inArray(modifier, valid_modifiers) === -1) {
modifier = '';
}
var regexp = new RegExp(param.regex[0], modifier);
if(regexp.test(value)){
return !param.negate;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment