code: function convertValidationsToObject(validations) {
    if (typeof validations === 'string') {
      return validations.split(/,(?![^{[]*[}\]])/g).reduce(function (validationsAccumulator, validation) {
        var args = validation.split(':');
        var validateMethod = args.shift();
  
        args = args.map(function (arg) {
          try {
            return JSON.parse(arg);
          } catch (e) {
            return arg; // It is a string if it can not parse it
          }
        });
  
        if (args.length > 1) {
          throw new Error('Formsy does not support multiple args on string validations. Use object format of validations instead.');
        }
  
        // Avoid parameter reassignment
        var validationsAccumulatorCopy = Object.assign({}, validationsAccumulator);
        validationsAccumulatorCopy[validateMethod] = args.length ? args[0] : true;
        return validationsAccumulatorCopy;
      }, {});
    }
  
    return validations || {};
  }
docs: /* eslint-disable react/default-props-match-prop-types