constructor(obj, error) {
    if (typeof obj === 'string') {
      this.rule = { type: obj };
    } else {
      this.rule = obj;
    }
    this.error = error;
    this.testEntryObject();
  }
@param {String|Object} obj the rule object describes the tests that are ran by the Rule
@param {String} error the error returned when the tested input is not correct