input accepts empty answer

Aug 16, 2008
124
0
input and inkey accept empty answers ("just Enter") even when /k sets the valid keys ("input /k"::^[yn]$" Database type: %%database_type" for example). Is there a way to prohibit the empty answer?
 
May 20, 2008
9,524
64
Syracuse, NY, USA
input and inkey accept empty answers ("just Enter") even when /k sets the valid keys ("input /k"::^[yn]$" Database type: %%database_type" for example). Is there a way to prohibit the empty answer?
Here, INKEY accepts only the specified keys. This, below, does not accept "Enter".
Code:
inkey /k"yn" %%zz
 
Aug 16, 2008
124
0
I can confirm this: inkey does not accept while input does accept an empty answer. Thread title adjusted.
 
Aug 16, 2008
124
0
The problem here is the EMPTY Enter. I suggest a minimum length parameter (input already has a maximum length parameter)