PayerErrors

PayerErrors dictionary is used by the 支付请求 API to indicate the presence of—and to explain how to correct—validation errors in the payer details. For each field in the payment information that fails validation, the PayerErrors object contains a string explaining the error.

The payer details include the payer's name, phone number, and email address.

特性

email 可选
If present, this DOMString is a string describing the validation error from which the payer's email address—as given by PaymentResponse.payerEmail —currently suffers. If this property is absent from the PayerErrors object, the email address passed validation.
name 可选
若此 DOMString is present in the object, the PaymentResponse.payerName property failed validation, and this string explains what needs to be corrected. If this property is absent, the paer name is fine
phone 可选
If present, this string is an error message explaining why the payer's phone number ( PaymentResponse.payerPhone ) failed validation. This property is absent if the phone number passed validation.

范例

规范

规范 状态 Comment
支付请求 API
The definition of 'PayerErrors' in that specification.
候选推荐 初始定义。

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
PayerErrors Chrome 71
Disabled
71
Disabled
Disabled From version 71: this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
69 — 71
Alternate Name Disabled
Alternate Name Uses the non-standard name: PayerErrorFields
Disabled From version 69 until version 71 (exclusive): this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
Edge ≤79
Disabled
≤79
Disabled
Disabled From version ≤79: this feature is behind the #web-payments preference (needs to be set to Enabled ).
Firefox 64
注意事项
64
注意事项
Enabled by default in nightly US English builds of Firefox 64 and later, and on other localizations when geolocation indicates the user is in the United States or Canada.
56
Disabled
Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ) and the dom.payments.request.supportedRegions preference (needs to be set to comma-delineated 2-character country code list ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 71
Disabled
71
Disabled
Disabled From version 71: this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
69 — 71
Alternate Name Disabled
Alternate Name Uses the non-standard name: PayerErrorFields
Disabled From version 69 until version 71 (exclusive): this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
Firefox Android 64
注意事项
64
注意事项
Enabled by default in nightly US English builds of Firefox 64 and later, and on other localizations when geolocation indicates the user is in the United States or Canada.
56
Disabled
Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ) and the dom.payments.request.supportedRegions preference (needs to be set to comma-delineated 2-character country code list ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 No Safari iOS ? Samsung Internet Android 不支持 No
email
Chrome 71
Disabled
71
Disabled
Disabled From version 71: this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
69 — 71
Alternate Name Disabled
Alternate Name Uses the non-standard name: payerEmailError
Disabled From version 69 until version 71 (exclusive): this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
Edge ≤79
Disabled
≤79
Disabled
Disabled From version ≤79: this feature is behind the #web-payments preference (needs to be set to Enabled ).
Firefox 64
注意事项
64
注意事项
Enabled by default in nightly US English builds of Firefox 64 and later, and on other localizations when geolocation indicates the user is in the United States or Canada.
56
Disabled
Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ) and the dom.payments.request.supportedRegions preference (needs to be set to comma-delineated 2-character country code list ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 71
Disabled
71
Disabled
Disabled From version 71: this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
69 — 71
Alternate Name Disabled
Alternate Name Uses the non-standard name: payerEmailError
Disabled From version 69 until version 71 (exclusive): this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
Firefox Android 64
注意事项
64
注意事项
Enabled by default in nightly US English builds of Firefox 64 and later, and on other localizations when geolocation indicates the user is in the United States or Canada.
56
Disabled
Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ) and the dom.payments.request.supportedRegions preference (needs to be set to comma-delineated 2-character country code list ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 No Safari iOS ? Samsung Internet Android 不支持 No
name
Chrome 71
Disabled
71
Disabled
Disabled From version 71: this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
69 — 71
Alternate Name Disabled
Alternate Name Uses the non-standard name: payerNameError
Disabled From version 69 until version 71 (exclusive): this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
Edge ≤79
Disabled
≤79
Disabled
Disabled From version ≤79: this feature is behind the #web-payments preference (needs to be set to Enabled ).
Firefox 64
注意事项
64
注意事项
Enabled by default in nightly US English builds of Firefox 64 and later, and on other localizations when geolocation indicates the user is in the United States or Canada.
56
Disabled
Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ) and the dom.payments.request.supportedRegions preference (needs to be set to comma-delineated 2-character country code list ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 71
Disabled
71
Disabled
Disabled From version 71: this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
69 — 71
Alternate Name Disabled
Alternate Name Uses the non-standard name: payerNameError
Disabled From version 69 until version 71 (exclusive): this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
Firefox Android 64
注意事项
64
注意事项
Enabled by default in nightly US English builds of Firefox 64 and later, and on other localizations when geolocation indicates the user is in the United States or Canada.
56
Disabled
Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ) and the dom.payments.request.supportedRegions preference (needs to be set to comma-delineated 2-character country code list ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 No Safari iOS ? Samsung Internet Android 不支持 No
phone
Chrome 71
Disabled
71
Disabled
Disabled From version 71: this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
69 — 71
Alternate Name Disabled
Alternate Name Uses the non-standard name: payerPhoneError
Disabled From version 69 until version 71 (exclusive): this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
Edge ≤79
Disabled
≤79
Disabled
Disabled From version ≤79: this feature is behind the #web-payments preference (needs to be set to Enabled ).
Firefox 64
注意事项
64
注意事项
Enabled by default in nightly US English builds of Firefox 64 and later, and on other localizations when geolocation indicates the user is in the United States or Canada.
56
Disabled
Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ) and the dom.payments.request.supportedRegions preference (needs to be set to comma-delineated 2-character country code list ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 71
Disabled
71
Disabled
Disabled From version 71: this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
69 — 71
Alternate Name Disabled
Alternate Name Uses the non-standard name: payerPhoneError
Disabled From version 69 until version 71 (exclusive): this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
Firefox Android 64
注意事项
64
注意事项
Enabled by default in nightly US English builds of Firefox 64 and later, and on other localizations when geolocation indicates the user is in the United States or Canada.
56
Disabled
Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ) and the dom.payments.request.supportedRegions preference (needs to be set to comma-delineated 2-character country code list ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 No Safari iOS ? Samsung Internet Android 不支持 No

图例

完整支持
完整支持
不支持
不支持
兼容性未知
兼容性未知
实验。期望将来行为有所改变。
实验。期望将来行为有所改变。
见实现注意事项。
用户必须明确启用此特征。
用户必须明确启用此特征。
使用非标名称。
使用非标名称。