added functionality to validate modals content
merge