From e6063a9595b0aeda9086c85a1aeac162af289952 Mon Sep 17 00:00:00 2001 From: ydong10 Date: Fri, 11 May 2012 03:09:07 +0000 Subject: Add logic to validate new input value with minimum. Signed-off-by: Eric Dong Reviewed-by: Liming Gao git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13308 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'MdeModulePkg') diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c index 5f857845aa..dd022ce554 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c @@ -726,6 +726,16 @@ TheKey2: EnterCarriageReturn: case CHAR_CARRIAGE_RETURN: + // + // Validate input value with Minimum value. + // + if (EditValue < Minimum) { + UpdateStatusBar (Selection, INPUT_ERROR, Question->QuestionFlags, TRUE); + break; + } else { + UpdateStatusBar (Selection, INPUT_ERROR, Question->QuestionFlags, FALSE); + } + // // Store Edit value back to Question // -- cgit v1.2.3