| Index: third_party/WebKit/Source/modules/payments/PaymentsValidators.h
|
| diff --git a/third_party/WebKit/Source/modules/payments/PaymentsValidators.h b/third_party/WebKit/Source/modules/payments/PaymentsValidators.h
|
| index 9aba401570bf121f8c3d8d9a1b06480ed6a410ee..672f3bed58bb9599cedd10c4a9d275bbba7a281d 100644
|
| --- a/third_party/WebKit/Source/modules/payments/PaymentsValidators.h
|
| +++ b/third_party/WebKit/Source/modules/payments/PaymentsValidators.h
|
| @@ -6,6 +6,7 @@
|
| #define PaymentsValidators_h
|
|
|
| #include "modules/ModulesExport.h"
|
| +#include "public/platform/modules/payments/payment_request.mojom-blink.h"
|
| #include "wtf/Allocator.h"
|
| #include "wtf/text/WTFString.h"
|
|
|
| @@ -29,6 +30,13 @@ public:
|
|
|
| // Returns true if |code| is a valid ISO 15924 script code.
|
| static bool isValidScriptCodeFormat(const String& code, String* optionalErrorMessage);
|
| +
|
| + // Returns true if the shipping address is valid:
|
| + // - Has a valid region code
|
| + // - Has a valid language code, if any.
|
| + // - Has a valid script code, if any.
|
| + // A script code should be present only if language code is present.
|
| + static bool isValidShippingAddress(const mojom::blink::ShippingAddressPtr&, String* optionalErrorMessage);
|
| };
|
|
|
| } // namespace blink
|
|
|