extract validation check into separate method and reduce code duplication
extract validation check into separate method and reduce code duplication

edombowsky/fabricator,azakordonets/fabricator,edombowsky/fabricator,azakordonets/fabricator