function validateRegExpPattern(pattern, flags) {
			try {
				validator.validatePattern(
					pattern,
					undefined1,
					undefined1,
					flags,
				);
				return null;
			} catch (err) {
				return err.message;
			}
		}
Check syntax error in a given pattern.
@param {string} pattern The RegExp pattern to validate.
@param {Object} flags The RegExp flags to validate.
@param {boolean} [flags.unicode] The Unicode flag.
@param {boolean} [flags.unicodeSets] The UnicodeSets flag.
@returns {string|null} The syntax error.