Flash message on URL validation state not updating on type
Bug Report
Summary
The flash/error messages that appear on updating the text input refers to the state of the URL at the last time the 'Next' button was pressed. Although the flash message is coming up each time the user types another letter, the entered text is not validated until we press 'Next' again.
Steps to reproduce
- Open up the application to the site check screen
- Enter a valid Mahara URL into the text box (notice how there are no flash messages appearing)
- Press 'Next'
- Go back
- Edit the URL to https://master.dev.mahara
- Tap 'Next'
- Clear the text box and
- Type in <www.google.com>
- Tap 'Next'
Current bug behaviour
- Flash message appears:
network request failed. Please re-enter URL.
- Each time we remove a letter, we receive the same flash message
- We still receive the same flash message
- Now we can see the correct flash message
Expected correct behaviour
The flash message should only appear when the user has tapped 'Next'.
Relevant logs and/or screenshots
Possible fixes
src/components/LoginTypes/LoginTypes.tsx
~ ACTIONS ~ /cc @jamiewatterson @maiamiller