You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug ValidationProvider components that use the confirmed rule will not pass validation on initial render if there's already a value associated with the component and the component that needs to match.
On initial render even if the values match you must interact with the ValidationProvider that has the confirmed rule on it for the form to become valid. It happens even if you include immediate on the ValidationProvider component(s).
To reproduce
Visit one of the CodeSandbox links below
Notice the existing values for both fields.
Start by focusing and then blurring the first field in either example. The form will then become "valid".
Expected behavior
The form should be valid if the field values match.
Additional context
Currently using localStorage on a production site to pre-fill email and email confirmation fields for a checkout form to help repeat customers quickly move through the checkout flow. Which prompted us to see this issue as it was raised by a user.
The text was updated successfully, but these errors were encountered:
On Fri, Dec 6, 2019 at 07:58 Abdelrahman Awad ***@***.***> wrote:
Thanks for reporting this, I have identified the issue and a fix should be
available in the next release.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2533?email_source=notifications&email_token=AATKCYRQ5IAZRMWGV4W6N3TQXGBTFA5CNFSM4JVZGJNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGCOA6I#issuecomment-562356345>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATKCYVTT7BA7OJJMP6GXB3QXGBTFANCNFSM4JVZGJNA>
.
Versions
Describe the bug
ValidationProvider
components that use theconfirmed
rule will not pass validation on initial render if there's already a value associated with the component and the component that needs to match.On initial render even if the values match you must interact with the
ValidationProvider
that has theconfirmed
rule on it for the form to becomevalid
. It happens even if you includeimmediate
on theValidationProvider
component(s).To reproduce
Expected behavior
The form should be valid if the field values match.
Demo link
CodeSandbox put together from scratch
https://codesandbox.io/s/veevalidate-email-confirmation-with-prefilled-value-m7cq7
CodeSandbox for the Cross Field Validation example that's been slightly tweaked to include "existing" values
https://codesandbox.io/s/codesandbox-zbpjy
Additional context
Currently using
localStorage
on a production site to pre-fill email and email confirmation fields for a checkout form to help repeat customers quickly move through the checkout flow. Which prompted us to see this issue as it was raised by a user.The text was updated successfully, but these errors were encountered: