Displaying error messages
Why to avoid adding validation errors in prototypes.
The NHS prototype kit does not currently include any code or feature that makes it easy to display error messages based upon the user’s answers (for example, leaving a field empty).
It’s possible to add validation to prototypes, but it is an advanced task and requires writing your own code to do so.
Avoid adding validation errors
In most scenarios, we recommend not adding validation errors to your prototype, as it can be a lot of effort for little value.
Instead, in usability research you could observe whether users do anything which would cause an error.
If you want to check whether your error messages make sense, you could make a copy of the page with static error messages and show these to participants within usability testing.
When developers are building your service for real, you could create a list elsewhere of all the possible errors in your service along with the required logic and the error message to display. For example, you could maintain a separate document or include the list as acceptance criteria on development cards.
See validation for prototypes by Craig Abbott for some further thoughts on this topic.