Move validation to separate method