Permalink
Browse files

BUGFIX Fixed CurrencyField->jsValidation() regex escaping (fixes #5462,…

… thanks mobiusnz) (from r103451)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112143 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 2948bc1 commit da671c628d6ef3fd339478d106e3d27bcb188139 @sminnee sminnee committed Oct 13, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 forms/CurrencyField.php
@@ -56,7 +56,7 @@ function jsValidation() {
if(!el || !el.value) return true;
var value = \$F(el);
- if(value.length > 0 && !value.match(/^\s*\\$?(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?\s*\$/)) {
+ if(value.length > 0 && !value.match(/^\s*\\\\$?(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?\s*\$/)) {
validationError(el,"$error","validation",false);
return false;
}

0 comments on commit da671c6

Please sign in to comment.