I use metadata prompt to request user input for some important info that will go to the test report. I have validation rules for the data I request but at the moment the only consequence for the operators is a little exclamation mark next to the problematic field. It doesn’t prevent them to proceed with empty/invalid data which is not acceptable.
Ideally I want to ensure that the data is valid before the operator is even able to press OK. Is there an (easy) way to achieve that?
Alternatively, I’d like to give operators another chance to enter the data in case it’s invalid. I’m aware of ThrowOnValidationError() method and it works well but is there a way to show the prompt again?
To summarize the question, is it possible to enforce data validation in metadata prompt with some decent UX?
Thanks for your input. My question was actually about metadata prompt specifically. I think such functionality is highly desirable there, maybe even more than in test steps.
Anyways, I decided to stop using metadata prompt. As much as I like it, it doesn’t allow me to achieve what I want at the moment. I implemented a custom dialog in the result listener following your suggestion.
@brennen_direnzo Thanks for following up. I believe rule validation wouldn’t be sufficient as at the moment it doesn’t prevent users from proceeding with invalid data. Being able to disable OK button in case validation is not successful might solve this issue.