function validateRequireContext(oRequireContext) {
		const rIdentifier = /^[a-zA-Z_][a-zA-Z0-9_$]*$/;
		const oResult = {
			throwError: false,
			errorMessage: ""
		};

		if (!oRequireContext || typeof oRequireContext !== "object") {
			oResult.errorMessage = "core:require in XMLView can't be parsed to a valid object";
			oResult.throwError = true;
			return oResult;
		}

		for (const sKey of Object.keys(oRequireContext)) {
			if (!rIdentifier.test(sKey)) {
				// '.' is not allowed to use in sKey
				oResult.errorMessage = `core:require in XMLView contains an invalid identifier: '${sKey}'`;

				if (!sKey.startsWith("$")) { // otherwise future log
					oResult.throwError = true;
				}

				return oResult;
			}

			const sValue = oRequireContext[sKey];
			if (!sValue || typeof sValue !== "string") {
				// The value should be a non-empty string
				oResult.errorMessage = `core:require in XMLView contains an invalid value '${sValue}' under key '${sKey}'`;
				oResult.throwError = true;
				return oResult;
			}

		}
		return oResult;
	}
Validate the parsed require context object

The require context object should be an object. Every key in the object should be a valid
identifier. Every key shouldn't contain '.' or shouldn't start with '$'. For latter case, future message is logged.
Every value in the object should be a non-empty string.

@param {object} oRequireContext The parsed require context
@return {string} The error message if the validation fails, otherwise it returns undefined