Adds min/max validations.