code: private boolean shouldValidateEmptyFields(FacesContext context)
      {
          ExternalContext ec = context.getExternalContext();
          Boolean validateEmptyFields = (Boolean) ec.getApplicationMap().get(VALIDATE_EMPTY_FIELDS_PARAM_NAME);
  
          if (validateEmptyFields == null)
          {
               String param = ec.getInitParameter(VALIDATE_EMPTY_FIELDS_PARAM_NAME);
  
               // null means the same as auto.
               if (param == null)
               {
                   param = "auto";
               }
               else
               {
                   // The environment variables are case insensitive.
                   param = param.toLowerCase();
               }
  
               if (param.equals("auto") && _ExternalSpecifications.isBeanValidationAvailable())
               {
                   validateEmptyFields = true;
               }
               else if (param.equals("true"))
               {
                   validateEmptyFields = true;
               }
               else
               {
                   validateEmptyFields = false;
               }
  
               // cache the parsed value
               ec.getApplicationMap().put(VALIDATE_EMPTY_FIELDS_PARAM_NAME, validateEmptyFields);
          }
  
          return validateEmptyFields;
      }
docs: PI64718: Helper method copied from javax.faces.component.UIInput