Skip to content

Commit 3faf6a4

Browse files
Drop prefixes, suffixes from error field members (#745)
* Drop prefixes, suffixes from error field members * Missing full stop
1 parent 74636a8 commit 3faf6a4

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

index.html

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,8 @@

521521
function validateAddress(shippingAddress) {
522522
const error = "Can't ship to this address.";
523523
const shippingAddressErrors = {
524-
cityError: "FarmVille is not a real place.",
525-
postalCodeError: "Unknown postal code for your country.",
524+
city: "FarmVille is not a real place.",
525+
postalCode: "Unknown postal code for your country.",
526526
};
527527
// Empty shippingOptions implies that we can't ship
528528
// to this address.
@@ -2795,18 +2795,18 @@

27952795
h2>
27962796
<pre class="idl">
27972797
dictionary AddressErrorFields {
2798-
DOMString addressLineError;
2799-
DOMString cityError;
2800-
DOMString countryError;
2801-
DOMString dependentLocalityError;
2802-
DOMString languageCodeError;
2803-
DOMString organizationError;
2804-
DOMString phoneError;
2805-
DOMString postalCodeError;
2806-
DOMString recipientError;
2807-
DOMString regionError;
2808-
DOMString regionCodeError;
2809-
DOMString sortingCodeError;
2798+
DOMString addressLine;
2799+
DOMString city;
2800+
DOMString country;
2801+
DOMString dependentLocality;
2802+
DOMString languageCode;
2803+
DOMString organization;
2804+
DOMString phone;
2805+
DOMString postalCode;
2806+
DOMString recipient;
2807+
DOMString region;
2808+
DOMString regionCode;
2809+
DOMString sortingCode;
28102810
};
28112811
pre>
28122812
<p>
@@ -2822,11 +2822,11 @@

28222822
Developers need to be aware that users might not have the ability to
28232823
fix certain parts of an address. As such, they need to be mindful to
28242824
not to ask the user to fix things they might not have control over
2825-
(e.g., <a>languageCodeErrora>).
2825+
(e.g., <a>languageCodea>).
28262826
p>
28272827
<dl>
28282828
<dt>
2829-
<dfn>addressLineErrordfn> member
2829+
<dfn>addressLinedfn> member
28302830
dt>
28312831
<dd>
28322832
Denotes that the <a>address linea> has a validation error. In the
@@ -2835,7 +2835,7 @@

28352835
"PaymentAddress">addressLinea> attribute's value.
28362836
dd>
28372837
<dt>
2838-
<dfn>cityErrordfn> member
2838+
<dfn>citydfn> member
28392839
dt>
28402840
<dd>
28412841
Denotes that the <a>citya> has a validation error. In the user
@@ -2844,7 +2844,7 @@

28442844
"PaymentAddress">citya> attribute's value.
28452845
dd>
28462846
<dt>
2847-
<dfn>countryErrordfn> member
2847+
<dfn>countrydfn> member
28482848
dt>
28492849
<dd>
28502850
Denotes that the <a>countrya> has a validation error. In the user
@@ -2853,7 +2853,7 @@

28532853
"PaymentAddress">countrya> attribute's value.
28542854
dd>
28552855
<dt>
2856-
<dfn>dependentLocalityErrordfn> member
2856+
<dfn>dependentLocalitydfn> member
28572857
dt>
28582858
<dd>
28592859
Denotes that the <a>dependent localitya> has a validation error.
@@ -2862,7 +2862,7 @@

28622862
"PaymentAddress">dependentLocalitya> attribute's value.
28632863
dd>
28642864
<dt>
2865-
<dfn>languageCodeErrordfn> member
2865+
<dfn>languageCodedfn> member
28662866
dt>
28672867
<dd>
28682868
Denotes that the <a>language codea> has a validation error. In
@@ -2871,7 +2871,7 @@

28712871
"PaymentAddress">languageCodea> attribute's value.
28722872
dd>
28732873
<dt>
2874-
<dfn>organizationErrordfn> member
2874+
<dfn>organizationdfn> member
28752875
dt>
28762876
<dd>
28772877
Denotes that the <a>organizationa> has a validation error. In the
@@ -2880,7 +2880,7 @@

28802880
"PaymentAddress">organizationa> attribute's value.
28812881
dd>
28822882
<dt>
2883-
<dfn>phoneErrordfn> member
2883+
<dfn>phonedfn> member
28842884
dt>
28852885
<dd>
28862886
Denotes that the <a>phone numbera> has a validation error. In the
@@ -2889,7 +2889,7 @@

28892889
"PaymentAddress">phonea> attribute's value.
28902890
dd>
28912891
<dt>
2892-
<dfn>postalCodeErrordfn> member
2892+
<dfn>postalCodedfn> member
28932893
dt>
28942894
<dd>
28952895
Denotes that the <a>postal codea> has a validation error. In the
@@ -2898,7 +2898,7 @@

28982898
"PaymentAddress">postalCodea> attribute's value.
28992899
dd>
29002900
<dt>
2901-
<dfn>recipientErrordfn> member
2901+
<dfn>recipientdfn> member
29022902
dt>
29032903
<dd>
29042904
Denotes that the <a>recipienta> has a validation error. In the
@@ -2907,7 +2907,7 @@

29072907
"PaymentAddress">addressLinea> attribute's value.
29082908
dd>
29092909
<dt>
2910-
<dfn>regionErrordfn> member
2910+
<dfn>regiondfn> member
29112911
dt>
29122912
<dd>
29132913
Denotes that the <a>regiona> has a validation error. In the user
@@ -2916,7 +2916,7 @@

29162916
"PaymentAddress">regiona> attribute's value.
29172917
dd>
29182918
<dt>
2919-
<dfn>regionCodeErrordfn> member
2919+
<dfn>regionCodedfn> member
29202920
dt>
29212921
<dd>
29222922
Denotes that the region code representation of the <a>regiona>
@@ -2926,7 +2926,7 @@

29262926
"PaymentAddress">regionCodea> attribute's value.
29272927
dd>
29282928
<dt>
2929-
<dfn>sortingCodeErrordfn> member
2929+
<dfn>sortingCodedfn> member
29302930
dt>
29312931
<dd>
29322932
The <a>sorting codea> has a validation error. In the user agent's
@@ -3255,19 +3255,19 @@

32553255
h3>
32563256
<pre class="idl">
32573257
dictionary PaymentValidationErrors {
3258-
PayerErrorFields payerErrors;
3259-
AddressErrorFields shippingAddressErrors;
3258+
PayerErrorFields payer;
3259+
AddressErrorFields shippingAddress;
32603260
};
32613261
pre>
32623262
<dl>
32633263
<dt>
3264-
<dfn>payerErrorsdfn> member
3264+
<dfn>payerdfn> member
32653265
dt>
32663266
<dd>
32673267
Validation errors related to the <a>payer detailsa>.
32683268
dd>
32693269
<dt>
3270-
<dfn>shippingAddressErrorsdfn> member
3270+
<dfn>shippingAddressdfn> member
32713271
dt>
32723272
<dd data-link-for="PaymentResponse">
32733273
Represents validation errors with the <a>PaymentResponsea>'s
@@ -3282,9 +3282,9 @@

32823282
h3>
32833283
<pre class="idl">
32843284
dictionary PayerErrorFields {
3285-
DOMString payerEmailError;
3286-
DOMString payerNameError;
3287-
DOMString payerPhoneError;
3285+
DOMString email;
3286+
DOMString name;
3287+
DOMString phone;
32883288
};
32893289
pre>
32903290
<p>
@@ -3297,7 +3297,7 @@

32973297
p>
32983298
<dl data-link-for="PaymentResponse">
32993299
<dt>
3300-
<dfn>payerEmailErrordfn> member
3300+
<dfn>emaildfn> member
33013301
dt>
33023302
<dd>
33033303
Denotes that the payer's email suffers from a validation error.
@@ -3306,7 +3306,7 @@

33063306
<a>payerEmaila> attribute's value.
33073307
dd>
33083308
<dt>
3309-
<dfn>payerNameErrordfn> member
3309+
<dfn>namedfn> member
33103310
dt>
33113311
<dd>
33123312
Denotes that the payer's name suffers from a validation error. In
@@ -3315,7 +3315,7 @@

33153315
attribute's value.
33163316
dd>
33173317
<dt>
3318-
<dfn>payerPhoneErrordfn> member
3318+
<dfn>phonedfn> member
33193319
dt>
33203320
<dd>
33213321
Denotes that the payer's phone number suffers from a validation
@@ -3325,12 +3325,12 @@

33253325
dd>
33263326
dl>
33273327
<pre class="example js" title="Payer-related validation errors">
3328-
const payerErrors = {
3329-
payerEmailError: "The domain is invalid.",
3330-
payerPhoneError: "Unknown country code.",
3331-
payerNameError: "Not in database",
3328+
const payer = {
3329+
email: "The domain is invalid.",
3330+
phone: "Unknown country code.",
3331+
name: "Not in database.",
33323332
};
3333-
await response.retry({ payerErrors });
3333+
await response.retry({ payer });
33343334
pre>
33353335
section>
33363336
section>

0 commit comments

Comments
 (0)