'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _formatMessage = require('@instructure/quiz-common/lib/format-message');

var _formatMessage2 = _interopRequireDefault(_formatMessage);

var _constants = require('@instructure/quiz-common/lib/constants');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = function (val, options) {
  var limit = options.limit || _constants.BUILD_CHAR_LIMIT;
  if (val && JSON.stringify(val).length > limit) {
    return 'Maximalt inneh\xE5ll har \xF6verskridits';
  }
};