So this code is converted into html BEFORE the data is sent to the user's browser to be rendered. I.e. this becomes static html. The fields you're using can be used to display client-side validation errors.
https://docs.djangoproject.com/en/dev/topics/forms/#customizing-the-form-template

You should definitely have server side validation, but this isn't it.