refactoring feature of validating chef attributes