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
In the following code I expect that parsing will be stopped right away, because email field is not valid, and abortEarly is set to true. But parsing awaits for the whole 10 seconds before returning result.
Ideally I expect that promise will not be even started in that case.
And the related question:
Is there a way to abort running promise? Using AbortController or something?
Ah, I see the issue: it executes all schemas asynchronously using Promise.all, awaiting all of them to resolve before checking any abortEarly flag.
I can try to investigate it but cannot promise success 😅
In the following code I expect that parsing will be stopped right away, because
email
field is not valid, andabortEarly
is set totrue
. But parsing awaits for the whole 10 seconds before returning result.Ideally I expect that promise will not be even started in that case.
And the related question:
Is there a way to abort running promise? Using
AbortController
or something?https://valibot.dev/playground/?code=JYWwDg9gTgLgBAKjgQwM5wG5wGZQiOAcg2QBtgAjCGQgbgCh6BjCAO1XgGUmALAUxDI4AXkwA6CBQBWfJjACCqAJ6smACgDe9OHAHJgpAFziwwMHzUYxHKMFYBzNQEoANOJi2Qzt1b0HnrtpwAK6ofFCsyCB8xlam5ooq6kE6VjZ2joE6qWKsbACi4DBK3iniggAeADJ8DjA8agDMAAxZ2Va8sgDWiapqziIAfHCsfADucAAKeCDAYf1QfKhOQ3Ba2dks7BCkfGKkEI6EiwCOwUs0TgwbOmEwACqgfBDBMP0rwsOLqGoe565wACMzRBrTKAF8nE4goFIQxmGwOHBvsFSPBRMgxvp4GlkNg+JNkFAwr11Nx+II3OtdIIDMZCIQXEFQuFItF6ScxuFioz6OCqUFkFRYPkiaQlMY-nwmTohdAYJMzHxRVBxZKoOcmXDGFtUDs9gdHCi0Vd6EA
The text was updated successfully, but these errors were encountered: