#include "validation_task.h"
#include <libaddressinput/address_data.h>
#include <libaddressinput/address_field.h>
#include <libaddressinput/address_metadata.h>
#include <libaddressinput/address_problem.h>
#include <libaddressinput/address_validator.h>
#include <libaddressinput/callback.h>
#include <libaddressinput/supplier.h>
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <string>
#include <re2/re2.h>
#include "lookup_key.h"
#include "post_box_matchers.h"
#include "rule.h"
#include "util/re2ptr.h"
#include "util/size.h"
namespace i18n {
namespace addressinput {
ValidationTask::ValidationTask(const AddressData& address, bool allow_postal,
bool require_name, const FieldProblemMap* filter,
FieldProblemMap* problems,
const AddressValidator::Callback& validated)
: … { … }
ValidationTask::~ValidationTask() = default;
void ValidationTask::Run(Supplier* supplier) { … }
void ValidationTask::Validate(bool success,
const LookupKey& lookup_key,
const Supplier::RuleHierarchy& hierarchy) { … }
void ValidationTask::CheckUnexpectedField(
const std::string& region_code) const { … }
void ValidationTask::CheckMissingRequiredField(
const std::string& region_code) const { … }
void ValidationTask::CheckUnknownValue(
const Supplier::RuleHierarchy& hierarchy) const { … }
void ValidationTask::CheckUnsupportedField() const { … }
void ValidationTask::CheckPostalCodeFormatAndValue(
const Supplier::RuleHierarchy& hierarchy) const { … }
void ValidationTask::CheckUsesPoBox(
const Supplier::RuleHierarchy& hierarchy) const { … }
void ValidationTask::ReportProblem(AddressField field,
AddressProblem problem) const { … }
void ValidationTask::ReportProblemMaybe(AddressField field,
AddressProblem problem) const { … }
bool ValidationTask::ShouldReport(AddressField field,
AddressProblem problem) const { … }
}
}