whatgoodisaroad/validity — Issue #8: sumMin() behave same as sumMax()
Author: dimuthun
Created: 2012-02-22 05:22:23+00:00
State: open

In the aggregate validator sumMin() implemented using 'less than' operator (<) where as it must be 'grater than' (>) operator. Therefore sumMin behave same as sumMax(). This defect was seen in Validity Version 1.2.0

__Current Implementation__

```javascript
if ($reduction.length && min < numericSum($reduction)) {
raiseAggregateError(
$reduction,
msg || format(
$.validity.messages.sumMin,
{ min:min }
)
);
```

__Corrected Implementation__

```javascript
if ($reduction.length && min > numericSum($reduction)) {
raiseAggregateError(
$reduction,
msg || format(
$.validity.messages.sumMin,
{ min:min }
)
);
```