Project

General

Profile

Actions

Bug #4100

closed

Validation of y/n answers in setlanip console menu

Added by Phillip Davis almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Console Menu
Target version:
Start date:
12/11/2014
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.2
Affected Architecture:

Description

At the moment the user can answer "yes" to most of the (y/n) questions, but then later code only checks if the answer is "y". Thus you can type in "yes" in some places, have it accepted, but actually the negative action is taken. That is weird and will mess up people who try typing a whole string starting with "y".
You can also type in anything starting with "y" - "yzzzzz", "yrandomstuff" - and it will be accepted but the negative action is taken.
I suggest fix this up - only accept [uppercase|lowercase] "y" "yes" "n" "no". Re-prompt in response to any other user input. Take the action on [y|yes], do not do it on [n|no].

I am never quite sure when I have got to the last question. Sometimes it is nice to have a chance to bail-out at the last moment and then start over answering the questions correctly! So I am also suggesting asking "Do you want to apply these changes? (y/n)" as the last question.

Actions

Also available in: Atom PDF