chromium/components/payments/core/payments_validators.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/payments/core/payments_validators.h"

#include "third_party/re2/src/re2/re2.h"
#include "url/gurl.h"

namespace payments {
namespace {

// We limit the maximum length of string to 2048 bytes for security reasons.
static const size_t maximumStringLength =;

}  // namespace

// static
bool PaymentsValidators::IsValidCurrencyCodeFormat(
    const std::string& code,
    std::string* optional_error_message) {}

// static
bool PaymentsValidators::IsValidAmountFormat(
    const std::string& amount,
    std::string* optional_error_message) {}

// static
bool PaymentsValidators::IsValidCountryCodeFormat(
    const std::string& code,
    std::string* optional_error_message) {}

// static
bool PaymentsValidators::IsValidErrorMsgFormat(
    const std::string& error,
    std::string* optional_error_message) {}

// static
bool PaymentsValidators::IsValidAddressErrorsFormat(
    const mojom::AddressErrorsPtr& errors,
    std::string* optional_error_message) {}

// static
bool PaymentsValidators::IsValidPayerErrorsFormat(
    const mojom::PayerErrorsPtr& errors,
    std::string* optional_error_message) {}

// static
bool PaymentsValidators::IsValidPaymentValidationErrorsFormat(
    const mojom::PaymentValidationErrorsPtr& errors,
    std::string* optional_error_message) {}

}  // namespace payments