Added error messages and popups for form validation