diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-05-11 03:09:07 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-05-11 03:09:07 +0000 |
commit | e6063a9595b0aeda9086c85a1aeac162af289952 (patch) | |
tree | c2b3f4e023124342387dc50b395c818814b6e336 /MdeModulePkg | |
parent | fe92f438ac860a09e57a2a6a37c1a1d8b6539321 (diff) | |
download | edk2-e6063a9595b0aeda9086c85a1aeac162af289952.zip edk2-e6063a9595b0aeda9086c85a1aeac162af289952.tar.gz edk2-e6063a9595b0aeda9086c85a1aeac162af289952.tar.bz2 |
Add logic to validate new input value with minimum.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13308 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c index 5f85784..dd022ce 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c @@ -727,6 +727,16 @@ 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
//
if (Question->Operand == EFI_IFR_DATE_OP) {
|