validation added to dialog