/* Validate the FormSet. If the formset is not validate, remove it from the list. */
BOOLEAN ValidateFormSet(FORM_BROWSER_FORMSET *FormSet)
/* Validate the FormSet. If the formset is not validate, remove it from the list. */
BOOLEAN ValidateFormSet(FORM_BROWSER_FORMSET *FormSet)
{
  BOOLEAN  Find;
  ASSERT (FormSet != NULL);
  Find = ValidateHiiHandle (FormSet->HiiHandle);
  if (!Find && (FormSet != gCurrentSelection->FormSet)) {
    CleanBrowserStorage (FormSet);
    RemoveEntryList (&FormSet->Link);
    DestroyFormSet (FormSet);
  }
  return Find;
}