Fixed validation to work with entity collections