Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Revert "Change all uses of ValidatedTextInput to also pass inputError…
Browse files Browse the repository at this point in the history
…Component"

This reverts commit ec734b9.
  • Loading branch information
opr committed May 20, 2021
1 parent ec734b9 commit 110e360
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Expand Up @@ -44,6 +44,7 @@ const TotalsCoupon = ( {
setValidationErrors,
clearValidationError,
hideValidationError,
validationInputError: ValidationInputError,
};

const validationError = getValidationError( 'coupon' );
Expand Down Expand Up @@ -106,7 +107,6 @@ const TotalsCoupon = ( {
validateOnMount={ false }
focusOnMount={ true }
showError={ false }
inputErrorComponent={ ValidationInputError }
{ ...textInputValidationFunctions }
/>
<Button
Expand Down
2 changes: 1 addition & 1 deletion assets/js/base/components/state-input/state-input.js
Expand Up @@ -43,6 +43,7 @@ const StateInput = ( {
setValidationErrors,
clearValidationError,
hideValidationError,
validationInputError: ValidationInputError,
};

const countryStates = states[ country ];
Expand Down Expand Up @@ -128,7 +129,6 @@ const StateInput = ( {
autoComplete={ autoComplete }
value={ value }
required={ required }
inputErrorComponent={ ValidationInputError }
{ ...textInputValidationFunctions }
/>
);
Expand Down
Expand Up @@ -41,6 +41,7 @@ const ContactFieldsStep = ( {
setValidationErrors,
clearValidationError,
hideValidationError,
validationInputError: ValidationInputError,
};

const createAccountUI = ! customerId &&
Expand Down Expand Up @@ -80,7 +81,6 @@ const ContactFieldsStep = ( {
autoComplete="email"
onChange={ onChangeEmail }
required={ true }
inputErrorComponent={ ValidationInputError }
{ ...textInputValidationFunctions }
/>
{ createAccountUI }
Expand Down
Expand Up @@ -32,6 +32,7 @@ const PhoneNumber = ( { isRequired = false, value = '', onChange } ) => {
setValidationErrors,
clearValidationError,
hideValidationError,
validationInputError: ValidationInputError,
};
return (
<ValidatedTextInput
Expand All @@ -46,7 +47,6 @@ const PhoneNumber = ( { isRequired = false, value = '', onChange } ) => {
}
value={ value }
onChange={ onChange }
inputErrorComponent={ ValidationInputError }
{ ...textInputValidationFunctions }
/>
);
Expand Down

0 comments on commit 110e360

Please sign in to comment.