testOneRule(val, type, path, obj) {
    if (Rule.TEST_FUNCTIONS[type].optional(val, this.rule.optional) === true) {
      return true;
    }

    const keys = Object.keys(this.rule).sort((key) => {
      if (key === 'type') return -1;
      return 0;
    });

    for (let i = 0; i < keys.length; i += 1) {
      const key = keys[i];
      const testFunction = Rule.TEST_FUNCTIONS[type][key];

      if (testFunction(val, this.rule[key], path, obj) === false && testFunction !== OPTIONAL) {
        return false;
      }
    }
    return true;
  }
@private
@param val value to be tested
@param {String} type the type from getTypes()
@param {String} path the path to the value if Validator is used
@param {any} obj full object beeing tested

@returns {boolean}