Participants couldn’t insert the age function because the insert button is disabled until you click outside the input area for validation to occur.
After entering the second input participants proceed to click the insert button but find it to be disabled. This happens most likely because the second input hasn’t been validated and the validation is triggered by clicking outside the input field (on-blur).
Recommendations
Goal: Revise the validation logic so participants can successfully insert a function
Ideas
- Enable the Insert button and trigger validation of the last input field when it is clicked.
- Validate input as user types
- Validate input automatically seconds after the user stops typing.
Proposed flow:
- Insert button is disabled when the input fields are empty
- Insert button is enabled when input has been typed
- When editor clicks on insert, validation is performed
- if there are errors, the Insert button is disabled and the error messages are displayed inline
- The Insert button is enabled again if changes are made to the input
- If there are no validation errors, the output is inserted
- The current validation on-blur is retained.
- A progress indicator will show in the dialog header during validation triggered by the Insert button
- if there are errors, the Insert button is disabled and the error messages are displayed inline