Added form validation to the application.