code: public static void validateKeysInDataFile(List<String> keysToValidate, String dataFileName,
              TestPlatform currentPlatform) {
          for (String currentKey : keysToValidate) {
  
              // For case: Invalid element inside a container, the key inside a container is split using delimiter.
              // It will be assigned to the currentKey to proceed with the validation.
              if (currentKey.contains(DELIMITER)) {
                  String[] keyInContainer = currentKey.split(DELIMITER);
                  // assigning the key to the current key to proceed with the validation
                  currentKey = keyInContainer[1];
              }
              if (!validForWebPlatform(currentPlatform, currentKey)
                      || !validForMobilePlatforms(currentPlatform, currentKey)) {
                  throw new IllegalArgumentException(String.format(
                          "Detected an invalid key [%s] in data file %s for Platform %s", currentKey, dataFileName,
                          currentPlatform.getPlatformName()));
              }
  
          }
      }
docs: Method to validate the keys against the {@link HtmlSeLionElementSet} or {@link IOSSeLionElementSet} as per the
  {@link TestPlatform}
  
  @param keysToValidate
  the keys from the Page Yaml input
  @param dataFileName
  The file name containing the keys
  @param currentPlatform
  the platform specified in the Page Yaml input