the code to initialize the spry text field will look like:
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "integer", {validateOn:["blur"], minValue:3});
the minValue setting determines the minimum value.
You could use an if statement to change that, the pseudo code would look like:
<?php if(category == 'small') { ?>
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "integer", {validateOn:["blur"], minValue:3});
<?php } elseif(category == 'medium') { ?>
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "integer", {validateOn:["blur"], minValue:2});
<?php } ?>[/php]