min = 0 would mean nonnegative number, not greater than 0.

So either make min = 1, or change the error message.