I did not really notice this until now but using a Datalist as input source does not enforce that a certain input is valid (as in: included in the Datalist) and users can accidentally break the app by submitting an invalid value.
Let's add a basic model validation that prevents users from doing so.
If users submit an invalid value they should see an alert message like: objective-with-typo is not a valid revealed objective
I did not really notice this until now but using a Datalist as input source does not enforce that a certain input is valid (as in: included in the Datalist) and users can accidentally break the app by submitting an invalid value.
Let's add a basic model validation that prevents users from doing so.
If users submit an invalid value they should see an alert message like:
objective-with-typo is not a valid revealed objective