Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

input accepts empty answer

Aug
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?
 
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
 
I can confirm this: inkey does not accept while input does accept an empty answer. Thread title adjusted.
 
The problem here is the EMPTY Enter. I suggest a minimum length parameter (input already has a maximum length parameter)
 
Back
Top