def validate(number)
      criterii = {}
      criterii[:luhn] = Check.luhn number
      criterii[:type] = !!infos(number)

      valid = criterii.all? { |_, v| v == true }

      {
        valid: valid,
        details: criterii
      }
    end
def validate(number)
      criterii = {}
      criterii[:luhn] = Check.luhn number
      criterii[:type] = !!infos(number)

      valid = criterii.all? { |_, v| v == true }

      {
        valid: valid,
        details: criterii
      }
    end
Validates a number