Update question validation logic, move the check pointer from after user input to after finish call the CHANGING callback.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming, Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15468 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Eric Dong
2014-04-15 15:38:48 +00:00
committed by ydong10
parent 387208ab04
commit bfae1330cc
9 changed files with 381 additions and 408 deletions

View File

@@ -227,6 +227,7 @@ typedef struct {
EFI_HII_VALUE Result; // Expression evaluation result
UINT8 TimeOut; // For EFI_IFR_WARNING_IF
EFI_IFR_OP_HEADER *OpCode; // Save the opcode buffer.
LIST_ENTRY OpCodeListHead; // OpCodes consist of this expression (EXPRESSION_OPCODE)
} FORM_EXPRESSION;
@@ -1675,4 +1676,39 @@ ConfigRequestAdjust (
IN BOOLEAN RespString
);
/**
Perform question check.
If one question has more than one check, process form high priority to low.
@param FormSet FormSet data structure.
@param Form Form data structure.
@param Question The Question to be validated.
@retval EFI_SUCCESS Form validation pass.
@retval other Form validation failed.
**/
EFI_STATUS
ValueChangedValidation (
IN FORM_BROWSER_FORMSET *FormSet,
IN FORM_BROWSER_FORM *Form,
IN FORM_BROWSER_STATEMENT *Question
);
/**
Pop up the error info.
@param BrowserStatus The input browser status.
@param OpCode The opcode use to get the erro info and timeout value.
@param ErrorString Error string used by BROWSER_NO_SUBMIT_IF.
**/
VOID
PopupErrorMessage (
IN UINT32 BrowserStatus,
IN EFI_IFR_OP_HEADER *OpCode, OPTIONAL
IN CHAR16 *ErrorString
);
#endif