Hello,
I suppose that there is a bug when async function is used to validate form fields. This can be reproduced in form validation examples on official atlaskit example page:
- Open Form validation example here https://atlaskit.atlassian.com/examples/core/form/validation
- Open developer tools and start monitoring console messages.
- In username input field type “Test” -> wait 2 seconds
- “Nice one, this username is available” message will appear
- Click on “Next” button -> submitted data is shown in the console
- Clear username input field and type “jill” -> wait for 2 seconds
- “This username is taken by somebody, try something else” error message will appear
- Click on “Next” button -> submitted data is not shown in the console, which is expected
- Clear username input field and type “Test” -> wait for 2 seconds
- “Nice one, this username is available” message will appear
- Click on “Next” button
Expected: Form is submitted and submitted data is shown in console
Actual: submitted data is not shown in the console.
Can someone please take a look at this? Is this expected behavior? If yes, can someone please let me know how to change that example code so that it works like I am expecting?
Thank you,
Alexander