← Back to team overview

dhis2-devs team mailing list archive

[Bug 790172] Re: integers-values-do-not-allow-negative-numbers

 

While I am at it, do we really allow data entry of scientific notation??

function isNumber( value )
{
	var regex = /^[+-]?\d+(\.\d+)?([eE][+-]?\d+)?$/;
	return regex.test( value );
}

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/790172

Title:
  integers-values-do-not-allow-negative-numbers

Status in DHIS 2 - District Health Information Software:
  New

Bug description:
  Last time I checked, integers included both positive and negative
  values with no decimal places. In our case, we need to enter a stock
  loss (negative) or adjustments (positive). When I enter a negative
  number (-1) after having set the type of the data element to integer I
  receive the message that the number must be an integer, which it is.
  :)

  On Rev 3643.


References