r58409 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58408‎ | r58409 | r58410 >
Date:21:47, 1 November 2009
Author:yaron
Status:deferred
Tags:
Comment:
Fix by Cam Webb to allow negative numbers to pass 'number' validation
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormUtils.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.inc
@@ -170,7 +170,7 @@
171171 return false;
172172 }
173173 } else if (type == 'number') {
174 - if (field.value.match(/^[\d\.,]+$/)) {
 174+ if (field.value.match(/^\-?[\d\.,]+$/)) {
175175 return true;
176176 } else {
177177 infobox = document.getElementById(info_id);

Status & tagging log