Skip to content

Commit 73c97f8

Browse files
committed
implement @ralain 's suggestion
Thank you @ralain
1 parent 7e9971e commit 73c97f8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

media/system/js/validate-uncompressed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ var JFormValidator = function() {
8787
// Try HTML5 pattern first then the handlers
8888
if ($el.attr('pattern') && $el.attr('pattern') != '') {
8989
if ($el.val().length) {
90-
isValid = /$el.attr('pattern')/.test($el.val());
90+
isValid = new RegExp('^'+$el.attr('pattern')+'$').test($el.val());
9191
handleResponse(isValid, $el);
9292
return isValid;
9393
} else {

media/system/js/validate.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)