| Index: third_party/WebKit/Source/modules/payments/PaymentsValidators.cpp
|
| diff --git a/third_party/WebKit/Source/modules/payments/PaymentsValidators.cpp b/third_party/WebKit/Source/modules/payments/PaymentsValidators.cpp
|
| index 989d5ecf46aec4f4c056917ecf996c0341ec69c0..7aac315f4073cf590d37020b4f11735608bc042f 100644
|
| --- a/third_party/WebKit/Source/modules/payments/PaymentsValidators.cpp
|
| +++ b/third_party/WebKit/Source/modules/payments/PaymentsValidators.cpp
|
| @@ -48,13 +48,16 @@ bool PaymentsValidators::IsValidCurrencyCodeFormat(
|
| }
|
|
|
| bool PaymentsValidators::IsValidAmountFormat(const String& amount,
|
| + const String& item_name,
|
| String* optional_error_message) {
|
| if (ScriptRegexp("^-?[0-9]+(\\.[0-9]+)?$", kTextCaseSensitive)
|
| .Match(amount) == 0)
|
| return true;
|
|
|
| - if (optional_error_message)
|
| - *optional_error_message = "'" + amount + "' is not a valid amount format";
|
| + if (optional_error_message) {
|
| + *optional_error_message =
|
| + "'" + amount + "' is not a valid amount format for " + item_name;
|
| + }
|
|
|
| return false;
|
| }
|
|
|