added form validation to modals