validate max/min of IntegerFields in forms

fixes http://manage.dimagi.com/default.asp?97993#556966