Added validation to properties dialog (issue #2347)