validation check for modal box