PayerErrors 字典用于 支付请求 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.
名称 可选
若此 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.

范例

规范

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

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
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 启用 ). To change preferences in Chrome, visit chrome://flags.
69 — 71 Alternate Name Disabled
Alternate Name Uses the non-standard name: PayerErrorFields
Disabled ). To change preferences in Chrome, visit
Edge ≤79 Disabled
≤79 Disabled
Disabled From version ≤79: this feature is behind the #web-payments preference (needs to be set to 启用 ).
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 ) 和 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 启用 ). To change preferences in Chrome, visit chrome://flags.
69 — 71 Alternate Name Disabled
Alternate Name Uses the non-standard name: PayerErrorFields
Disabled ). To change preferences in Chrome, visit
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 ) 和 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 启用 ). To change preferences in Chrome, visit chrome://flags.
69 — 71 Alternate Name Disabled
Alternate Name Uses the non-standard name: payerEmailError
Disabled ). To change preferences in Chrome, visit
Edge ≤79 Disabled
≤79 Disabled
Disabled From version ≤79: this feature is behind the #web-payments preference (needs to be set to 启用 ).
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 ) 和 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 启用 ). To change preferences in Chrome, visit chrome://flags.
69 — 71 Alternate Name Disabled
Alternate Name Uses the non-standard name: payerEmailError
Disabled ). To change preferences in Chrome, visit
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 ) 和 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
名称 Chrome 71 Disabled
71 Disabled
Disabled From version 71: this feature is behind the #web-payments preference (needs to be set to 启用 ). To change preferences in Chrome, visit chrome://flags.
69 — 71 Alternate Name Disabled
Alternate Name Uses the non-standard name: payerNameError
Disabled ). To change preferences in Chrome, visit
Edge ≤79 Disabled
≤79 Disabled
Disabled From version ≤79: this feature is behind the #web-payments preference (needs to be set to 启用 ).
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 ) 和 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 启用 ). To change preferences in Chrome, visit chrome://flags.
69 — 71 Alternate Name Disabled
Alternate Name Uses the non-standard name: payerNameError
Disabled ). To change preferences in Chrome, visit
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 ) 和 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 启用 ). To change preferences in Chrome, visit chrome://flags.
69 — 71 Alternate Name Disabled
Alternate Name Uses the non-standard name: payerPhoneError
Disabled ). To change preferences in Chrome, visit
Edge ≤79 Disabled
≤79 Disabled
Disabled From version ≤79: this feature is behind the #web-payments preference (needs to be set to 启用 ).
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 ) 和 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 启用 ). To change preferences in Chrome, visit chrome://flags.
69 — 71 Alternate Name Disabled
Alternate Name Uses the non-standard name: payerPhoneError
Disabled ). To change preferences in Chrome, visit
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 ) 和 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

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

实验。期望将来行为有所改变。

实验。期望将来行为有所改变。

见实现注意事项。

用户必须明确启用此特征。

用户必须明确启用此特征。

使用非标名称。

使用非标名称。

元数据

  • 最后修改:
  1. 支付请求 API
  2. PayerErrors
  3. 特性
    1. 名称
    2. phone
  4. Related pages for Payment Request API
    1. HTMLIFrameElement.allowPaymentRequest
    2. MerchantValidationEvent
    3. PaymentAddress
    4. PaymentMethodChangeEvent
    5. PaymentRequest
    6. PaymentRequestUpdateEvent
    7. PaymentResponse

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1