docs: function rules () {
          var pub = {};
          pub.maxLength = function (val, max) {
  
              if (!Array.isArray(val) && typeof val !== 'string' || typeof max !== 'number') {
                  return getResult(new Error('rules.maxLength(fail): value must be a string or array, max must be a number'));
              }
  
              if (val.length > max) {
                  return getResult(getError('maxLength', max, val));
              }
  
              return getResult(null);
          };
          pub.minLength = function (val, min) {
  
              if (!Array.isArray(val) && typeof val !== 'string' || typeof min !== 'number') {
                  return getResult(new Error('rules.minLength(fail): value must be a string or array, min must be a number'));
              }
  
              if (val.length < min) {
                  return getResult(getError('minLength', min, val));
              }
  
              return getResult(null);
          };
          pub.minimum = function (val, min) {
  
              if (typeof val !== 'number' || typeof min !== 'number') {
                  return getResult(new Error('rules.minimum(fail): value must be a number, min must be a number'));
              }
  
              if (val < min) {
                  return getResult(getError('minimum', min, val));
              }
  
              return getResult(null);
          };
          pub.maximum = function (val, max) {
  
              if (typeof val !== 'number' || typeof max !== 'number') {
                  return getResult(new Error('rules.maximum(fail): value must be a number, max must be a number'));
              }
  
              if (val > max) {
                  return getResult(getError('maximum', max, val));
              }
  
              return getResult(null);
          };
          pub.exclusiveMinimum = function (val, min) {
  
              if (typeof val !== 'number' || typeof min !== 'number') {
                  return getResult(new Error('rules.exclusiveMinimum(fail): value must be a number, min must be a number'));
              }
  
              if (val <= min) {
                  return getResult(getError('exclusiveMinimum', min, val));
              }
  
              return getResult(null);
          };
          pub.exclusiveMaximum = function (val, max) {
  
              if (typeof val !== 'number' || typeof max !== 'number') {
                  return getResult(new Error('rules.exclusiveMaximum(fail): value must be a number, max must be a number'));
              }
  
              if (val >= max) {
                  return getResult(getError('exclusiveMinimum', max, val));
              }
  
              return getResult(null);
          };
          pub.divisibleBy = function (val, div) {
  
              if (typeof val !== 'number' || typeof div !== 'number') {
                  return getResult(new Error('rules.divisibleBy(fail): value must be a number, div must be a number'));
              }
  
              var multiplier = Math.max((val - Math.floor(val)).toString().length - 2,
                  (div - Math.floor(div)).toString().length - 2);
              multiplier = multiplier > 0 ? Math.pow(10, multiplier) : 1;
  
              if ((val * multiplier) % (div * multiplier) !== 0) {
                  return getResult(getError('divisibleBy', div, val));
              }
  
              return getResult(null);
          };
          pub.minItems = function (val, min) {
  
              if (!Array.isArray(val) || typeof min !== 'number') {
                  return getResult(new Error('rules.minItems(fail): value must be a array, min must be a number'));
              }
  
              if (val.length < min) {
                  return getResult(getError('minItems', min, val.length));
              }
  
              return getResult(null);
          };
          pub.maxItems = function (val, max) {
  
              if (!Array.isArray(val) || typeof max !== 'number') {
                  return getResult(new Error('rules.maxItems(fail): value must be a array, max must be a number'));
              }
  
              if (val.length > max) {
                  return getResult(getError('maxItems', max, val.length));
              }
  
              return getResult(null);
          };
          pub.uniqueItems = function (val) {
  
              if (!Array.isArray(val)) {
                  return getResult(new Error('rules.uniqueItems(fail): value must be a array'));
              }
  
              if (!(uniqueArrayHelper(val))) {
                  return getResult(getError('uniqueItems', val, true));
              }
  
              return getResult(null);
          };
          pub['enum'] = function (val, en) {
  
              if (typeof val === 'undefined' || !Array.isArray(en)) {
                  return getResult(new Error('rules.enum(fail): value must be a defined and enum mus be a array'));
              }
  
              if (en.indexOf(val) === -1) {
                  return getResult(getError('enum', en, val));
              }
  
              return getResult(null);
          };
  
          return pub;
      }