Added validation for dialog layout.