You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When both :min and :max options are passed to multi_select, the min option is ignored if number of selections is less than or equal to the max option value. Expected behavior to ensure number of selected items is between min and max values.
Steps to reproduce the problem
1. run `TTY::Prompt.new.multi_select("Select:", %w(one two), min: 1, max: 1)`
2. don't make a selection and hit enter
3. observed: prompt returns
4. desired: prompt validates the min requirement
Actual behaviour
Expected behaviour
When enter is hit and the number of selections is less than :min, I expect the prompt to not return.
Cause
^ as long as max is valid min is ignored
Describe your environment
OS version: MacOS 10.15.7
Ruby version: 2.7.1
TTY::Prompt version: 0.23.1
The text was updated successfully, but these errors were encountered:
Describe the problem
When both :min and :max options are passed to multi_select, the min option is ignored if number of selections is less than or equal to the max option value. Expected behavior to ensure number of selected items is between min and max values.
Steps to reproduce the problem
Actual behaviour
Expected behaviour
When enter is hit and the number of selections is less than
:min
, I expect the prompt to not return.Cause
^ as long as max is valid min is ignored
Describe your environment
The text was updated successfully, but these errors were encountered: