if (
          rule.regexp &&
          (rule.type === 'string' || !rule.type) &&
          !rule.regexp.test(value)
        ) {