Dmitriy/Move validation to the setter property

Fixes #3

Edited by Andrey Veltischev

Merge request reports