add validate when layouts empty