dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23938
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11672: fixed bug in commons.isNumber regex (fixes bug with lat/lng in add/update ou)
------------------------------------------------------------
revno: 11672
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-08-15 11:56:00 +0200
message:
fixed bug in commons.isNumber regex (fixes bug with lat/lng in add/update ou)
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2013-07-18 13:32:41 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2013-08-15 09:56:00 +0000
@@ -1683,7 +1683,7 @@
*/
function isNumber( value )
{
- var regex = /^(0|-?[1-9]\d*)(\.\d+)?$/;
+ var regex = /^(-?0|-?[1-9]\d*)(\.\d+)?(E\d+)?$/;
return regex.test( value );
}