Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(933)

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentsValidators.h

Issue 2271113002: Accept any string for currency code in PaymentRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Allow null as per spec Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 2ef1e37572f9ba39c54976cbc546dd91ebffd8d6..6ee2499f214f664705657ea20ee08977034967a2 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentsValidators.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentsValidators.h
@@ -16,7 +16,8 @@ class MODULES_EXPORT PaymentsValidators final {
STATIC_ONLY(PaymentsValidators);
public:
- // Returns true if |code| is a valid ISO 4217 currency code.
+ // The most common identifiers are three-letter alphabetic codes as defined by [ISO4217] (for example, "USD" for US Dollars)
+ // however any string of at most 2048 characters is considered valid. Returns false if currency |code| is too long (greater than 2048).
static bool isValidCurrencyCodeFormat(const String& code, String* optionalErrorMessage);
// Returns true if |amount| is a valid currency code as defined in ISO 20022 CurrencyAnd30Amount.

Powered by Google App Engine
This is Rietveld 408576698