tpay-com / tpay-php

MIT License
24 stars 27 forks source link

Validate number & float #7

Closed Tomirad closed 7 years ago

Tomirad commented 7 years ago

Validate number integer or float have a message:

throw new TException(sprintf('Field "%s" must be higher than zero', $name));

but your condition is:

if ($value < 0) {
         throw new TException(sprintf('Field "%s" must be higher than zero', $name));
}

so $value allows value equal zero.

piotrjozwiak commented 7 years ago

Fixed