validate.js
function(errors, options) {
      errors = v.pruneEmptyErrors(errors, options);
      errors = v.expandMultipleErrors(errors, options);
      errors = v.convertErrorMessages(errors, options);

      var format = options.format || "grouped";

      if (typeof v.formatters[format] === 'function') {
        errors = v.formatters[format](errors);
      } else {
        throw new Error(v.format("Unknown format %{format}", options));
      }

      return v.isEmpty(errors) ? undefined : errors;
    }
function(errors, options) {
      errors = v.pruneEmptyErrors(errors, options);
      errors = v.expandMultipleErrors(errors, options);
      errors = v.convertErrorMessages(errors, options);

      var format = options.format || "grouped";

      if (typeof v.formatters[format] === 'function') {
        errors = v.formatters[format](errors);
      } else {
        throw new Error(v.format("Unknown format %{format}", options));
      }

      return v.isEmpty(errors) ? undefined : errors;
    }
function ( errors , options ) { errors = v . pruneEmptyErrors ( errors , options ) ; errors = v . expandMultipleErrors ( errors , options ) ; errors = v . convertErrorMessages ( errors , options ) ; var format = options . format || "grouped" ; if ( typeof v . formatters [ format ] === 'function' ) { errors = v . formatters [ format ] ( errors ) ; } else { throw new Error ( v . format ( "Unknown format %{format}" , options ) ) ; } return v . isEmpty ( errors ) ? undefined : errors ; }
Takes the output from runValidations and converts it to the correct output format.
Takes the output from runValidations and converts it to the correct output format .