'use strict';

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

var _formatMessage = require('../format-message');

var _formatMessage2 = _interopRequireDefault(_formatMessage);

var _constants = require('../../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 'Maximaler Inhalt \xFCberschritten';
  }
};