mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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
This commit is contained in:
parent
2948bc1c64
commit
da671c628d
@ -56,7 +56,7 @@ Behaviour.register({
|
|||||||
if(!el || !el.value) return true;
|
if(!el || !el.value) return true;
|
||||||
|
|
||||||
var value = \$F(el);
|
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);
|
validationError(el,"$error","validation",false);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user