"use strict";

const containsRemoteFields = require("../ast/contains-remote-fields");
const ValidationError = require("@validatem/error");

module.exports = function forbidRemoteFields(value) {
	if (containsRemoteFields(value)) {
		throw new ValidationError(`Must not reference any remote fields`);
	}
};
