英国
SW1A 1AA
预加载西班牙真实城市邮编映射与 CNMC & Correos 合规号段(+34 600 000 xxx),支持在下方分屏控制台一键切换边界压测并导出 Playwright / Stripe / SQL / CSV。
{
"meta": {
"service": "AddressQA",
"seed": "qa-es-01",
"country": "ES",
"countrySlug": "es",
"state": "ALL",
"taxFree": false,
"phoneMode": "safe",
"boundary": "normal",
"count": 1
},
"fixtures": [
{
"id": "qa-es-01-1-ES-CT",
"index": 1,
"seed": "qa-es-01",
"boundary": "normal",
"recipient": {
"fullName": "Priya Conti",
"nativeName": "Priya Conti",
"displayName": "Priya Conti",
"firstName": "Priya",
"lastName": "Conti",
"email": "priya.conti.21@example.test"
},
"address": {
"line1": "La Rambla 91",
"line1Native": "La Rambla 91",
"line2": "Suite 547",
"city": "Barcelona",
"cityNative": "Barcelona",
"state": "CT",
"stateName": "Barcelona",
"postalCode": "08002",
"zipPlus4": "08002",
"country": "ES",
"countryName": "Spain",
"formatted": "La Rambla 91, Suite 547, Barcelona, CT 08002, ES"
},
"phone": {
"countryCode": "ES",
"dialCode": "+34",
"areaCode": "93",
"regionCode": "CT",
"regionName": "Barcelona",
"city": "Barcelona",
"mode": "safe",
"regulatorSafe": false,
"regulatorAuthority": "CNMC & Correos",
"e164": "+34612000712",
"international": "+34 612 000 712",
"national": "612 000 712",
"rfc3966": "tel:+34612000712",
"digitsOnly": "612000712"
},
"qaFlags": {
"taxFreeUsState": false,
"leadingZeroPostal": true,
"streetLength": 12,
"hasUnicode": false,
"hasLine2": true,
"regulatorSafePhone": false,
"postalRequired": true
}
}
]
} // Generated by AddressQA (seed: qa-es-01, country: ES, boundary: normal)
import { test, expect, type Page } from '@playwright/test';
const checkoutFixture = {
"fullName": "Priya Conti",
"email": "priya.conti.21@example.test",
"phoneE164": "+34612000712",
"line1": "La Rambla 91",
"line2": "Suite 547",
"city": "Barcelona",
"state": "CT",
"postalCode": "08002",
"country": "ES"
};
async function fillCheckoutForm(page: Page, data: typeof checkoutFixture) {
await page.getByLabel(/full name/i).fill(data.fullName);
await page.getByLabel(/email/i).fill(data.email);
await page.getByLabel(/phone/i).fill(data.phoneE164);
await page.getByLabel(/address line 1|street/i).fill(data.line1);
if (data.line2) await page.getByLabel(/address line 2|apt|suite/i).fill(data.line2);
await page.getByLabel(/city/i).fill(data.city);
await page.getByLabel(/state|region|province/i).fill(data.state);
if (data.postalCode) await page.getByLabel(/zip|postal/i).fill(data.postalCode);
}
test('checkout validation (ES / normal)', async ({ page }) => {
const target = checkoutFixture;
await page.goto('/checkout');
await fillCheckoutForm(page, target);
await page.getByRole('button', { name: /continue|pay/i }).click();
await expect(page.getByTestId('order-summary-postal')).toHaveText(target.postalCode || 'N/A');
}); {
"shipping": {
"name": "Priya Conti",
"phone": "+34612000712",
"address": {
"line1": "La Rambla 91",
"line2": "Suite 547",
"city": "Barcelona",
"state": "CT",
"postal_code": "08002",
"country": "ES"
}
},
"billing_details": {
"name": "Priya Conti",
"email": "priya.conti.21@example.test",
"phone": "+34612000712",
"address": {
"line1": "La Rambla 91",
"line2": "Suite 547",
"city": "Barcelona",
"state": "CT",
"postal_code": "08002",
"country": "ES"
}
},
"metadata": {
"qa_seed": "qa-es-01",
"qa_boundary": "normal",
"us_tax_free_state": "false",
"regulator_safe_phone": "false"
}
} -- AddressQA deterministic SQL seed (qa-es-01)
INSERT INTO qa_address_fixtures (fixture_id, seed, full_name, email, phone_e164, phone_national, street_line1, street_line2, city, region_code, postal_code, country_code, tax_free_us_state) VALUES ('qa-es-01-1-ES-CT', 'qa-es-01', 'Priya Conti', 'priya.conti.21@example.test', '+34612000712', '612 000 712', 'La Rambla 91', 'Suite 547', 'Barcelona', 'CT', '08002', 'ES', FALSE); # Deterministic AddressQA Edge API request
curl -sS "https://addressqa.com/api/v1/fixtures?country=ES&seed=qa-es-01" | jq .
# Export directly as Excel-safe CSV or Stripe Checkout JSON:
curl -sS "https://addressqa.com/api/v1/fixtures?country=ES&seed=qa-es-01&format=stripe"
curl -sS "https://addressqa.com/api/v1/fixtures?country=ES&seed=qa-es-01&format=csv" -o fixtures-qa-es-01.csv fixture_id,seed,full_name,email,phone_e164,phone_national,street_line1,street_line2,city,state,postal_code,country,tax_free_us_state,boundary
qa-es-01-1-ES-CT,qa-es-01,Priya Conti,priya.conti.21@example.test,+34612000712,612 000 712,La Rambla 91,Suite 547,Barcelona,CT,"=""08002""",ES,false,normal | 校验维度 | 规范与边界说明 |
|---|---|
| 邮编正则与长度 | 示例 28013(最大长度 5,正则 /^(?:0[1-9]|[1-4]\d|5[0-2])\d{3}$/) |
| 前导零截断风险 | 高风险(例如 08002)— 严禁存为 INT,CSV 须加引号保护 |
| E.164 电话与区号同步 | 国家码 +34,标准有效长度 9 位,安全段 +34 600 000 xxx |
| 典型测试城市样本 | Madrid (MD) · 邮编 28013 · 区号 91 |
| 权威标准来源 | 西班牙 01–52 省号前缀 5 位邮编(巴塞罗那 08002 含前导零)与无长途字冠 9 位闭合拨号。 (CNMC & Correos) |
| 行政区 | 代码 | 城市 | 邮编 | 区号 |
|---|---|---|---|---|
| Madrid | MD | Madrid | 28013 | +34 (91) |
| Barcelona | CT | Barcelona | 08002 | +34 (93) |
SW1A 1AA
10117
75001
1012 JS