Structure validations

This is a slight change in definition API but I prefere hash based options when too many params appear.