Added a validate_on_submit() method call.
It does form processing: if it is called when form is being presented to the user (before they get a chance to input shit) it will return False, so the template has to be rendered.
If it is called as part of a form submission request, it gathers data, runs validators attached to fields, and returns True if all okay. If any one field fails during validation then it returns False. Error messages will be added later.
flash function shows a message on next page presented to the user. redirect function tels the browser to navigate to a different web page than the one requested.