How to set minimum and maximum number of selection?