← Back to team overview

dhis2-devs team mailing list archive

Re: [Branch ~dhis2-devs-core/dhis2/trunk] Rev 4611: added proper validation for real/natural numbers (including support for e-notation)

 

On Mon, Sep 19, 2011 at 1:42 PM, Morten Olav Hansen <mortenoh@xxxxxxxxx>wrote:

> Hi
>
> > I agree with these validation on field but why don't you apply the "Math
> > methods" - which are in commons - into them. The "Math methods" are
> working
> > on regex that I think it is very very robust in validating.
>
> Ok, sounds good. What are they named? I never found any validations
> for positive/negative numbers..
>
>
Yes, they are isRealNumber() which is including in positive/negative
numbers, isNegativeInt(), and isPositiveInt().


>  > Btw, the name of method "positive/negative_natural_number" is quite
> > sensitive to me.
>
> The naming here is a bit off. I need suggestions here, even whole
> numbers is not defined always mean the set of all integers.
>
> --
> Morten
>

About this you could also ask Jason for more suggestion.

-- 
"*Expert By Chance*"

Follow ups

References