With the use of the web framework, the application implicitly checks that the form fields for the topic and content text are present. The check happens at the time the framework populates the
FormData struct with the values of the form fields. There is no way to display this error yet. If you remove one of the form fields and run the application, then the application seems to crash. As the same approach is used to validate user input, we need to fix this.
If an error occurs, then a web page must be rendered to show the error message. You use the
@errorDisplay annotation to define the function to be called in order to display the error:
@errorDisplay!getError void createNewNote(FormData ...