I'm trying to find a way to have the selectable items in a treelist to be items with a layout. Since items without a layout are not visible, it must be impossible to select these. Do i have to write a custom validation? If yes, how can i check if an item has a layout?
You can restrict a treelist selection to specific templates, which should allow you to achieve this without customization (Assuming you can be sure that only items based certain templates will have layout).
You need to use IncludeTemplatesForSelection
in the Treelist's datasource.
This blog post explains further http://getfishtank.ca/blog/treelist-data-source-hidden-functionality