Install WTForms and update requirements.txt.
Add form validation using WTForms and regex.